The system function MathLib.atan2 computes the principal value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. The result is in radians and is in the range of -pi to pi.
MathLib.atan2( numericField1 mathLibNumber in, numericField2 mathLibNumber in) returns (result mathLibTypeDependentResult)
myItemY = 1; myItemX = 5; // returns pi/2 result = MathLib.atan2(myItemY, myItemX);
Related concepts
Syntax diagram for EGL functions
Related reference
EGL library MathLib