API abs
Jump to navigation
Jump to search
Returns the absolue value of the number.
absoluteValue = math.abs(num); absoluteValue = abs(num);
Arguments
- num
- number - number to return numeric (absolute) value of.
Returns
- absoluteValue
- number - The absolute value of the argument number.
Example
print(abs(-14)); -- 14