From 190b78549e0fa1a801786e73d914185e1fbca2a6 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Mon, 11 Sep 2023 17:38:31 -0700 Subject: Non libultra Boot Cleanup (#1370) * reorganize * math64 * rcp_utils * osSyncPrintfUnused * comment spacing --- src/boot/O2/fmodf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/boot/O2/fmodf.c (limited to 'src/boot/O2/fmodf.c') 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; +} -- cgit v1.2.3