diff options
Diffstat (limited to 'src/rmd_math.c')
-rw-r--r-- | src/rmd_math.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rmd_math.c b/src/rmd_math.c index 1cf3d29..3527490 100644 --- a/src/rmd_math.c +++ b/src/rmd_math.c @@ -28,6 +28,7 @@ #include <math.h> -double rmdRoundf(double val) { +double rmdRoundf(double val) +{ return val < 0.0 ? ceilf(val - .5) : floorf(val + 0.5); } |