atan2()

NAME

atan2(), atan2f() - arc tangent function of two variables

SYNOPSIS

#include <math.h>

double atan2 (double y, double x) float atan2f (float y, double x)

DESCRIPTION

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.

RETURN VALUES

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.

ERRORS

Atan2(3) and atan2f(3) can fail for the following reasons:

[EDOM]
Both x and y were zero.
[ERANGE]
The result underflows.

SEE ALSO

acos(3)

asin(3)

atan(3)

cos(3)

cosh(3)

math(3)

sin(3)

sinh(3)

tan(3)

tanh(3)