math.abs

Syntax

nr = math.abs(n)

Get the absolute value of a number or a vector. In the case of a vector the absolute value operation is performed on each component separately.

Returns:nr - absolute value
Arguments:n - number