Abs

Returns the absolute value of a number

Method Signature

Abs(value=[numeric])

Arguments

Argument
Type
Required
Description
Default

value

numeric

true

The number to return the absolute value of

Examples

Absolute Value of -4.3

Run Example

abs( -4.3 );

Result: 4.3

Additional Examples

Run Example

absVal = abs( 1 );
dump( absVal );
absVal = abs( 1.1 );
dump( absVal );
absVal = abs( -1 );
dump( absVal );
absVal = abs( -1.1 );
dump( absVal );

Last updated

Was this helpful?