Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>arg() determine angle in the complex plane</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 arg()                   Determine Angle in the Complex Plane

 #include   <complex.h>

 double     arg(z);
 complex    z;                           Complex number

        The arg() function returns the angle of a number in the complex
        plane. The real axis is angle 0, and the imaginary axis is angle
        ./2.

   -------------------------------- Example ---------------------------------

        This example just returns the angle of (5.7, 9.6).

 #include <iostream.h>
 #include <complex.h>

 int main(void)

    double x = 5.7, y = 9.6, angle1;
    complex z = complex(x, y);
    angle1 = arg(z);
    cout << "Angle of z (in radians) = " << ang << "\n";
    return 0;


See Also: complex() norm() polar()

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