Skip to content
Reference > Methods

abs(value)

Definition

Number abs(Number value)

Description

Returns absolute value, such that negative numbers are multiplied by -1 and positive numbers are unchanged.

Parameter Definition

Name Type Description
value Number Number to get absolute value for

Examples

1
2
3
Double r1 = abs(-3.32D); // r1 == 3.32
Integer r2 = abs(0); // r2 == 0
Integer r3 = abs(4); // r3 == 4