Function abs
Source pub fn abs(x: number) -> number
Expand description
Returns the absolute value of a number (integer/float).
§Parameters
§Return value
The maximum value between x and −x. The subtype of the result
matches the subtype of the argument.
§Examples
print(math.abs(-5)) --> 5
print(math.abs(-5.25)) --> 5.25
print(math.abs(7)) --> 7