ezeio2:scriptref: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
  • ezeio2/scriptref/abs.txt
  • Last modified: 2021-09-27 22:44
  • by andreh