From c6672e62acbcccd62d9bbcee9db2a057527934fa Mon Sep 17 00:00:00 2001 From: "J.-F. Cap" Date: Sun, 10 Feb 2019 14:06:10 +0100 Subject: [PATCH] Added math/abs binding --- src/core/math.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/math.c b/src/core/math.c index 4dd0fd5b..3f4f285b 100644 --- a/src/core/math.c +++ b/src/core/math.c @@ -176,6 +176,11 @@ static const JanetReg math_cfuns[] = { JDOC("(math/pow a x)\n\n" "Return a to the power of x.") }, + { + "math/abs", janet_fabs, + JDOC("(math/abs x)\n\n" + "Return the absolute value of x.") + }, {NULL, NULL, NULL} };