|
wxEcMath - Official documentation
0.6.4
|
A complex number. More...
#include <ec_complex.h>
Public Member Functions | |
| wxEcComplex () | |
| wxEcComplex (double real, double imaginary) | |
| void | FromPolar (double r, double theta) |
| double | Modulus () |
| double | Argument () |
| wxEcComplex | Conjugate () |
| wxString | AsString (bool usePolarNotation=false) |
| wxEcComplex | operator+ (const wxEcComplex &complex) const |
| wxEcComplex | operator- (const wxEcComplex &complex) const |
| wxEcComplex | operator* (const wxEcComplex &complex) const |
| wxEcComplex | operator/ (const wxEcComplex &complex) const |
| bool | operator== (const wxEcComplex &complex) const |
| bool | operator!= (const wxEcComplex &complex) const |
Public Attributes | |
| double | Re |
| double | Im |
A complex number.
A complex number is internally represented like cartesian coordinates, ie a+ib. If you want to use a polar representation, have a look to the following code :
|
inline |
The default constructor with initialization to zero.
|
inline |
The extended constructor.
| real | The real part. |
| imaginary | The imaginary part. |
|
inline |
Returns the argument of the complex number.
|
inline |
Displays the complex number as string.
| usePolarNotation | false will return a+ib, true will return r.e^ti |
|
inline |
Returns the complex conjugate of the complex number.
|
inline |
Sets the value of the complex number from a polar couple (r,theta).
|
inline |
Returns the absolute value of the complex number.
|
inline |
Operator to compare two complex numbers. It checks if Re!=Re or Im!=Im.
|
inline |
Operator to multiply two complex numbers.
|
inline |
Operator to sum two complex numbers.
|
inline |
Operator to substract two complex numbers.
|
inline |
Operator to divide two complex numbers. Check against division by zero is not performed.
|
inline |
Operator to compare two complex numbers. It checks if Re==Re and Im==Im.
| double wxEcComplex::Im |
The imaginary part of the number.
| double wxEcComplex::Re |
The real part of the number.