Availability
This routine is available starting with katl-commons 2.5.
Syntax
abs(number)
Description
Returns the absolute value of a number. The absolute value of a number is the number without its sign.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
number | Number | Yes | the number to get the absolute value for |
Return type
number
Example
number a = abs(4); number b = abs(-4); print("a= " + a); print("b= " + b);
Print: a= 4;
b= 4;
See also