Abs()

From ElectronicWar

Jump to: navigation, search
Function information for abs()
Function abs()
Parameters Float
API Challenge
Cost $0
Level N/A
CPU Usage 0
Description Returns a float representing the absolute value of the provided float



[edit] Example

If a challenge asked you to find absolute value of the difference of two variables, the script would be:

float x = getInputFloat();
float y = getInputFloat();
float dif = x - y;
setOutputFloat(abs(dif));
Personal tools