math.abs(n) returns the absolute value of n.
math.abs(n)
n
if n is a number, returns the absolute value of n(i.e. it returns nif n >= 0, and -n if n < 0).
n >= 0
-n
n < 0
if n is not a number, returns null.
null
Last updated 2 months ago
Was this helpful?