aboutsummaryrefslogtreecommitdiffstats
path: root/math/fabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/fabs.c')
-rw-r--r--math/fabs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/math/fabs.c b/math/fabs.c
new file mode 100644
index 0000000..8a4adf3
--- /dev/null
+++ b/math/fabs.c
@@ -0,0 +1,3 @@
+#include "maths.h"
+
+double fabs(double n) { return n < 0 ? -n : n; }