Math.abs(number)
Top  Previous  Next


SWiSH Player Support
SWF4 or later - Supported Internally

Syntax
Math.abs(x)

Arguments
x: A number or expression.

Returns
A number, the absolute value of x.

Description
Method: Returns the absolute value of x.

Sample
Math.abs(3
.4);   // returns 3.4
Math.abs(-3
.4);    // returns 3.4