Abs - Math

Member of: Math Script

Calculates the absolute value of the number it is given.

SyntaxEdit

float Function abs(float afValue) native global

ParametersEdit

  • afValue: The value to get the absolute value of.

Return ValueEdit

The absolute value of the passed-in value.

ExamplesEdit

float x = math.abs(5.0) ; x == 5
float y = math.abs(-5.0) ; y == 5

See AlsoEdit