ComplexD class public functions

ComplexD(void);
Creates a complex number with the real and imaginary parts undefined.
ComplexD(double realPart, double imagPart = 0);
Creates a complex number from a real number, or a real and imaginary part of a complex number.
ComplexD(const ComplexD& aNumber);
Creates a complex number from another complex number.
~ComplexD();
Does nothing.
double abs(void) const;
Returns the absolute value of the complex number.
double arg(void) const;
Returns the argument (angle) of the complex number in radians.
ComplexD cexp(double aPower = 1);
Returns the complex exponential E^(this*aPower).
ComplexD conj(void) const;
Returns the complex conjugate of the complex number. The imaginary part of the complex number is multiplied by -1.
double& im(void);
Returns the imaginary part of the complex number.
double& operator[](int index);
this[0] returns the real part of the complex number; this[1] returns the imaginary part of the complex number.
ComplexD& operator=(const ComplexD& aNumber);
ComplexD& operator=(double aNumber);
Assignment operator for complex numbers
ComplexD& operator+=(const ComplexD& aNumber);
ComplexD& operator-=(const ComplexD& aNumber);
ComplexD& operator*=(const ComplexD& aNumber);
ComplexD& operator/=(const ComplexD& aNumber);
Modifying arithmetic operators.
ComplexD operator+(void) const;
Unary plus sign.
ComplexD operator+(ComplexD aNumber) const;
ComplexD operator+(ComplexD const & aNumber) const;
ComplexD operator+(double aNumber) const;
Addition of complex numbers.
ComplexD operator-(void) const;
Unary minus sign.
ComplexD operator-(ComplexD aNumber) const;
ComplexD operator-(double aNumber) const;
Subtration of ComplexD numbers.
ComplexD operator*(ComplexD aNumber) const; ComplexD operator*(double aNumber) const;
Multiplication of complex numbers.
ComplexD operator/(ComplexD aNumber) const; ComplexD operator/(double aNumber) const;
Division of ComplexD numbers.
double& re(void);
Returns the real part of the complex number.
void zero(void);
Sets the real and imaginary parts of the complex number to 0.

Related functions:

ostream& operator<<(ostream& output, ComplexD aNumber);
Ascii printout of a complex number.