ABS

Macro that will return the absolute value

Description

ABS( number )

Returns the absolute value of the given number.

Works with both float and integer parameters.

Parameters

number input value

Return value

Returns the absolute value of number.

Example usage

   new Float:x;
   new i;
 
   x = ABS( 123.45 );     // 123.45
   i = ABS( 456 );        // 456
 
   x = ABS( -123.45 );    // 123.45
   i = ABS( -456 );       // 456