A class for complex numbers. More...
#include <include/EST_Complex.h>
Public Member Functions | |
double | mag () const |
Polar magnitude, read only. More... | |
double | ang (int degrees=0) const |
Polar angle, read only. More... | |
double & | real () |
The real part - can be used for reading or writing. More... | |
double & | imag () |
The imaginary part - can be used for reading or writing. More... | |
Constructor functions | |
EST_Complex () | |
default constructor, initialises values to 0.0 More... | |
EST_Complex (double real, double imag) | |
Constructor initialising real and imaginary parts. More... | |
Friends | |
EST_Complex | operator+ (const EST_Complex &z1, const EST_Complex &z2) |
EST_Complex | operator+ (const EST_Complex &z, float x) |
EST_Complex | operator+ (float x, const EST_Complex &z) |
EST_Complex | operator- (const EST_Complex &z1, const EST_Complex &z2) |
EST_Complex | operator- (const EST_Complex &z, float x) |
EST_Complex | operator- (float x, const EST_Complex &z) |
EST_Complex | operator* (const EST_Complex &z1, const EST_Complex &z2) |
EST_Complex | operator* (const EST_Complex &z, float x) |
EST_Complex | operator* (float x, const EST_Complex &z) |
EST_Complex | operator/ (const EST_Complex &z1, const EST_Complex &z2) |
EST_Complex | operator/ (const EST_Complex &z, float x) |
EST_Complex | operator/ (float x, const EST_Complex &z) |
std::ostream & | operator<< (std::ostream &s, const EST_Complex &a) |
A class for complex numbers.
The class stores the values as cartesian real and imaginary parts, but these can be read as polar coordinates using the EST_Complex::mag() and EST_Complex::ang() methods. Addition, subtraction, multiplication and division are supported.
Definition at line 59 of file EST_Complex.h.
|
inline |
default constructor, initialises values to 0.0
Definition at line 67 of file EST_Complex.h.
|
inline |
Constructor initialising real and imaginary parts.
Definition at line 69 of file EST_Complex.h.
|
inline |
Polar magnitude, read only.
Definition at line 74 of file EST_Complex.h.
|
inline |
Polar angle, read only.
Definition at line 78 of file EST_Complex.h.
|
inline |
The real part - can be used for reading or writing.
Definition at line 88 of file EST_Complex.h.
|
inline |
The imaginary part - can be used for reading or writing.
Definition at line 90 of file EST_Complex.h.
|
friend |
Definition at line 44 of file EST_Complex.cc.
|
friend |
Definition at line 49 of file EST_Complex.cc.
|
friend |
Definition at line 54 of file EST_Complex.cc.
|
friend |
Definition at line 61 of file EST_Complex.cc.
|
friend |
Definition at line 66 of file EST_Complex.cc.
|
friend |
Definition at line 71 of file EST_Complex.cc.
|
friend |
Definition at line 78 of file EST_Complex.cc.
|
friend |
Definition at line 83 of file EST_Complex.cc.
|
friend |
Definition at line 88 of file EST_Complex.cc.
|
friend |
Definition at line 95 of file EST_Complex.cc.
|
friend |
Definition at line 104 of file EST_Complex.cc.
|
friend |
Definition at line 109 of file EST_Complex.cc.
|
friend |
Definition at line 106 of file EST_Complex.h.