1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-03 11:29:42 +00:00
cc65/libsrc/float/softmath/softmath-roundf.c

12 lines
205 B
C

#include <math.h>
/* FIXME: this is really too simple */
float roundf(float x)
{
if (x > 0.0f) {
return (float)((signed long)(x + 0.5f));
}
return (float)((signed long)(x - 0.5f));
}