Abs

Category: Arithmetics
Since engine version: 4.6.5.0 CP

Description

Returns the absolute value of the given parameter, ignoring the sign of the value.

Syntax

int Abs (int iValue);

Parameter

iValue:
Absolute coordinate you want to convert to a relative coordinate

Example

Log("Aktuelle Fluggeschwindigkeit: %d Clonks/min", Abs(GetXDir(FindObject(BLMP))));
Prints the absolute velocity of a blimp.
Sven2, November 2001