abs

 
 
 

Returns the absolute value of number. The absolute value of an integer or floating point number is the number without its positive or negative sign. The absolute value of a vector is a vector with components stripped of negative signs.

int abs(int number)

float abs(float number)

vector abs(vector number)

number is the number for which you want the absolute value.

Examples

abs(-1)

Returns the value 1.

abs(1)

Returns the value 1.

abs(<<-1,-2.43,555>>)

Returns <<1, 2.43, 555>>.

abs(Ball.translateY)

If Ball.translateY contains -20, this returns 20.