atan2(), atan2f() - arc tangent function of two variables
#include <math.h>
double atan2 (double y, double x)
float atan2f (float y, double x)
The atan2(3) function 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 atan2f(3) function does the same, but takes float arguments rather than doubles.
The atan2(3) and atan2f(3) functions, if successful, return the arc tangent of y/x in the range [-, +] radians. If both x and y are zero, the global variable errno is set.
Atan2(3) and atan2f(3) can fail for the following reasons:
acos(3)
asin(3)
atan(3)
cos(3)
cosh(3)
math(3)
sin(3)
sinh(3)
tan(3)
tanh(3)