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.
eglx.lang
static function atan2(y float in, x float in) returns(float);
The returned value is between -pi and pi.
After the following code runs, the value of result is 0.19739555984988078.
x INT = 5; y INT = 1; result FLOAT = mathLib.atan2(y, x);
In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.
| Target | Issue |
|---|---|
| Java | No issues. |
| JavaScript | No issues. |