ATAN2(3) BSD Programmer's Manual ATAN2(3)NAME
atan2, atan2f - arc tangent functions of two variables
SYNOPSIS
#include <math.h>
double
atan2(double y, double x);
float
atan2f(float y, float x);
DESCRIPTION
The atan2() and the atan2f() functions compute the principal value of the
arc tangent of y/x, in the range [-pi, +pi] radians, using the signs of
both arguments to determine the quadrant of the return value. For a dis-
cussion of error reporting, see math(3).
ERRORS
If x = 0 and y = 0 then:
_IEEE_ The return value is 0.
_POSIX_ Same as _IEEE_, but errno is also set to EDOM.
_XOPEN_ Same as _POSIX_, but errno is only set if matherr(3) returns 0.
The exception type is DOMAIN.
_SVID_ Same as _XOPEN_, and a message is printed to stderr if errno is
set.
SEE ALSOacos(3), asin(3), atan(3), cos(3), cosh(3), math(3), sin(3),
sinh(3), tan(3), tanh(3)STANDARDS
The atan2() function conforms to ANSI C X3.159-1989 (``ANSI C '').
BSDI BSD/OS February 17, 1998 1