OpenBSD manual page server

Manual Page Search Parameters

ATAN2(3) Library Functions Manual ATAN2(3)

atan2, atan2f, atan2larc tangent functions of two variables

#include <math.h>

atan2(double y, double x);

atan2f(float y, float x);

long double
atan2l(long double y, long double x);

The () 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 () function is a single precision version of atan2(). The () function is an extended precision version of atan2().

The atan2(), atan2f() and atan2l() functions, if successful, return the arc tangent of y/x in the range [-pi, +pi] radians. If both x and y are zero, the global variable errno is set to EDOM.

acos(3), asin(3), atan(3), cos(3), cosh(3), sin(3), sinh(3), tan(3), tanh(3)

The atan2() function conforms to ANSI X3.159-1989 (“ANSI C89”).

June 29, 2021 OpenBSD-current