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>polar() convert polar number to complex number</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 polar()                 Convert Polar Number to Complex Number

 #include   <complex.h>

 complex polar(magnit, angle);
 double magnit;         Magnitude of number to convert
 double angle;          Angle of number to convert

        The polar() function converts a complex number from polar form
        (i.e. magnitude and angle - the default angle is 0) to complex
        format.

       Returns:     A complex number.

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

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

 int main(void)

    double this_mag = 10, this_ang = 0;
    cout << "Complex form = " << polar(this_mag, this_ang);
    return 0;


See Also: arg() complex() norm()

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