atan2

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.

Library:LibC
Classification:ANSI
Service:Math

Syntax

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

Parameters

x and y

(IN) Specifies the arguments whose arc tangent is to be computed.

Return Values

Returns the arc tangent of y/x, in the range (-pi, pi). When the arguments are outside the permissible range, errno is set and matherr is called.

Remarks

A domain error occurs if both arguments are zero.

See Also