7.12.4.4 The atan2 functions

Synopsis

1

#include <math.h>
double atan2(double y, double x);
float atan2f(float y, float x);
long double atan2l(long double y, long double x);

Description

2

The atan2 functions compute the value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. A domain error may occur if both arguments are zero.

Returns

3

The atan2 functions return arctan y/x in the interval [-pi , +pi ] radians.