diff options
Diffstat (limited to 'mons_math/src/util.c')
-rw-r--r-- | mons_math/src/util.c | 7 |
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; +} + |