atan2

Arctangent

double atan2 (
        double x
)

Arguments

x Dividend
y Divisor

Return value

The arctangent of x/y (atan(x/y)) is returned. The result range is [-pi, pi].

Explanation

The arctangent of x/y is calculated and its value is returned.

Notes

Error processing is shown in the table below:

Condition Return value Error
x==0 && y==0
0
Domain error

See Also

atan()