Abs
Calculates the absolute value of a numeric input, returning the non-negative magnitude of the number.
Syntax
Abs(value)
Parameters
- value (number): The numeric value to process
Returns
- number: The absolute value of the input (always non-negative)
Description
The Abs function handles both integer and floating-point values according to standard mathematical absolute value semantics. Negative numbers become positive, while positive numbers remain unchanged.
Examples
var result1 = Abs(-5) # Returns 5
var result2 = Abs(3.14) # Returns 3.14
var result3 = Abs(-0.5) # Returns 0.5
var result4 = Abs(0) # Returns 0