The system function MathLib.abs returns the absolute value of a number.
MathLib.abs(numericField mathLibNumber in) returns (result mathLibTypeDependentResult)
MathLib.abs works on every target system. In relation to Java™ programs, EGL uses one of the abs() methods in the Java StrictMath class so that the runtime behavior is the same for every Java Virtual Machine.
myItem = -5; result = MathLib.abs(myItem); // result = 5
Related concepts
Syntax diagram for EGL functions
Related reference
EGL library MathLib