mirror of
https://github.com/cc65/cc65.git
synced 2024-06-03 11:29:42 +00:00
18 lines
221 B
C
18 lines
221 B
C
|
|
#include <math.h>
|
|
|
|
/* FIXME: this is really too simple */
|
|
float ffloor(float x)
|
|
{
|
|
signed long n;
|
|
float d;
|
|
|
|
n = (signed long)x;
|
|
d = (float)n;
|
|
|
|
if (x >= 0) {
|
|
return d;
|
|
}
|
|
return d - 1;
|
|
}
|