From 362bc5e61353d2ffb9767f15ab649fbfa5ac4cf4 Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Tue, 1 Mar 2022 19:29:42 +0000 Subject: Name fmodf (#1162) --- src/code/fmodf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/code/fmodf.c (limited to 'src/code/fmodf.c') diff --git a/src/code/fmodf.c b/src/code/fmodf.c new file mode 100644 index 000000000..6cc69dd87 --- /dev/null +++ b/src/code/fmodf.c @@ -0,0 +1,12 @@ +#include "global.h" + +f32 fmodf(f32 x, f32 y) { + s32 quot; + + if (y == 0.0f) { + return 0.0f; + } + quot = x / y; + + return x - (quot * y); +} -- cgit v1.2.3