HP 3000 Manuals

atan2 [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

atan2 

Returns the arc tangent of the input Cartisian coordinates x and y.

Syntax 

     #include <math.h>
     double atan2 (double y, double x)

Parameters 

y             A real number indicating the Cartisian coordinate y.

x             A real number indicating the Cartisian coordinate x.

Return Values 

n             The arc tangent of (x, y).

0             Indicates both arguments are zero and errno is set to EDOM.
              A DOMAIN error is also printed on the standard error output
              device.

Description 

The atan2 function returns the arc tangent of y/x, in the range of -pi to
pi.  It uses the signs of both arguments to determine the quadrant of the
return value.

Error handling can be changed by a user-written matherr function.

See Also 

matherr(), ANSI C 4.5.2.4, POSIX.1 8.1



MPE/iX 5.0 Documentation