atan2 - arc tangent function
#include <math.h> double atan2(double y, double x);
The atan2() 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.An application wishing to check for error situations should set errno to 0 before calling atan2(). If errno is non-zero on return, or the return value is NaN, an error has occurred.
Upon successful completion, atan2() returns the arc tangent of y/x in the range [-, ] radians. If both arguments are 0.0, an implementation-dependent value is returned and errno may be set to [EDOM].If x or y is NaN, NaN is returned and errno may be set to [EDOM].
If the result underflows, 0.0 is returned and errno may be set to [ERANGE].
The atan2() function may fail if:
- [EDOM]
- Both arguments are 0.0 or one or more of the arguments is NaN.
- [ERANGE]
- The result underflows.
No other errors will occur.
None.
None.
None.
atan(), isnan(), tan(), <math.h>.
Derived from Issue 1 of the SVID.