diff --git a/src/jswrap_math.c b/src/jswrap_math.c index d0346cc1d1..74cd146ce9 100644 --- a/src/jswrap_math.c +++ b/src/jswrap_math.c @@ -145,15 +145,12 @@ This is a standard JavaScript class that contains useful Maths routines "type" : "staticmethod", "class" : "Math", "name" : "abs", - "generate" : "jswrap_math_abs", + "generate" : "fabs", "params" : [ ["x","float","A floating point value"] ], "return" : ["float","The absolute value of x (eg, ```Math.abs(2)==2```, but also ```Math.abs(-2)==2```)"] }*/ -JsVarFloat jswrap_math_abs(JsVarFloat x) { - return (x<0)?-x:x; -} /*JSON{ "type" : "staticmethod", "ifndef" : "SAVE_ON_FLASH_EXTREME", diff --git a/src/jswrap_math.h b/src/jswrap_math.h index 25f83b58d7..90840ae556 100644 --- a/src/jswrap_math.h +++ b/src/jswrap_math.h @@ -25,7 +25,6 @@ JsVarInt jswrap_integer_valueOf(JsVar *v); -JsVarFloat jswrap_math_abs(JsVarFloat x); JsVarFloat jswrap_math_asin(JsVarFloat x); double jswrap_math_mod(double x, double y); double jswrap_math_pow(double x, double y);