Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <math.h>
    double atan2( double y, double x );

Description:
    The atan2 function computes the principal value of the arctangent of
    y/x, using the signs of both arguments to determine the quadrant of the
    return value.  A domain error occurs if both arguments are zero.

Returns:
    The atan2 function returns the arctangent of y/x, in the range (-P,P).
     When the argument is outside the permissible range, the  matherr
    function is called.  Unless the default  matherr function is replaced,
    it will set the global variable  errno to  EDOM, and print a "DOMAIN
    error" diagnostic message using the  stderr stream.

Example:
    #include <stdio.h>
    #include <math.h>

    void main()
      {
        printf( "%f\n", atan2( .5, 1. ) );
      }

    produces the following:

    0.463648

Classification:
    ANSI

Systems:
    Math

See Also:
    acos, asin, atan, matherr

See Also: acos asin

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson