summaryrefslogtreecommitdiff
path: root/src/boot_O2/fmodf.c
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2021-08-11 03:15:31 +0100
committerGitHub <noreply@github.com>2021-08-10 22:15:31 -0400
commit82cc274b6aa358bab5de54f85edab1727916eb33 (patch)
tree973de5958ffd4c357302473cf1aef93ae493f58e /src/boot_O2/fmodf.c
parent93333067387172ec0929799a6797fe5aac0a69de (diff)
Sort boot files (#260)
Diffstat (limited to 'src/boot_O2/fmodf.c')
-rw-r--r--src/boot_O2/fmodf.c12
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;
+}