mirror of
https://github.com/cc65/cc65.git
synced 2024-06-03 11:29:42 +00:00
12 lines
205 B
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));
|
|
}
|