Sign in
third-party-mirror
/
mingw-w64
/
518dd33c326f65684e8e938262b2a9ca94804cfb
/
.
/
mingw-w64-crt
/
math
/
round.c
blob: fc38acd6cca5ef377292cab042a6dae9ae42e1da [
file
] [
log
] [
blame
]
#include
<math.h>
double
round
(
double
x
)
{
/* Add +/- 0.5 then then round towards zero. */
return
trunc
(
x
+
(
x
>=
0.0
?
0.5
:
-
0.5
));
}