atan2 — Arc tangent of two variables
fix32 atan2(fix32 y, fix32 x);
This function calculates the arc tangent of the two variables x and y. It is similar to calculating the arc tangent of y / x
, except that the signs of both arguments are used to determine the quadrant of the result.
The function returns the result in radians, which is between -PI and PI (inclusive).
The arc tangent of y / x
in radians.
init { printf("%.6f", atan2(1.0, 2.0)); // ~0.463647609001 }