diff options
Diffstat (limited to 'src/boot/O2/fmodf.c')
| -rw-r--r-- | src/boot/O2/fmodf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/boot/O2/fmodf.c b/src/boot/O2/fmodf.c new file mode 100644 index 000000000..2f8aa74bf --- /dev/null +++ b/src/boot/O2/fmodf.c @@ -0,0 +1,12 @@ +#include "global.h" + +f32 fmodf(f32 dividend, f32 divisor) { + s32 quotient; + + if (divisor == 0.0f) { + return 0.0f; + } + quotient = dividend / divisor; + + return dividend - quotient * divisor; +} |
