ABS function
ABS(Number) ABS(Number)
Number
Number or { Number }
The input number.
Returns
Number or { Number }
The absolute value of the given number.
Returns the absolute value of a number. ABS(4)ABS(4) returns 4 and ABS(-4)ABS(-4) returns 4.
An absolute value does not have a sign, meaning that this function essentially removes the sign from negative values, while keeping zero and positive values as-is. The absolute value can be thought of as the value's distance from zero.