aboutsummaryrefslogtreecommitdiff
path: root/mons_math/src/util.c
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-07 11:27:18 -0500
committerLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-07 11:27:18 -0500
commit4da7be39827ea5888ef9c97b1aadf61b0d76347c (patch)
tree15d0ff8f8bcb0e871efb1b2e65c2bc8d07b17565 /mons_math/src/util.c
initial commit (lol)
Diffstat (limited to 'mons_math/src/util.c')
-rw-r--r--mons_math/src/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mons_math/src/util.c b/mons_math/src/util.c
new file mode 100644
index 0000000..f0f3ec0
--- /dev/null
+++ b/mons_math/src/util.c
@@ -0,0 +1,7 @@
+#include "mons_math/util.h"
+#include <math.h>
+
+int mons_float_approx_equal(float a, float b) {
+ return fabs(a - b) < MONS_FLOAT_EQUAL_EPSILON;
+}
+