The mathAbs() function returns the absolute value of a number.
If the value is negative, it returns the positive value. If the value is
already positive, it returns the value unchanged.
Since
0.12.0
Param: x
A number
Returns
The absolute value of x. If x is negative, it returns -x. If x is 0, it returns 0.
Returns the absolute value of a number (the value without regard to whether it is positive or negative).
For example, the absolute value of -5 is the same as the absolute value of 5.
Parameters
x: number
A numeric expression for which the absolute value is needed.
The
mathAbs()
function returns the absolute value of a number. If the value is negative, it returns the positive value. If the value is already positive, it returns the value unchanged.Since
0.12.0
Param: x
A number
Returns
The absolute value of x. If x is negative, it returns -x. If x is 0, it returns 0.
Example