#include <Complex.hxx>
Public Member Functions | |
Complex (T re=0.f, T im=0.f) | |
Complex (const Complex &rhs) | |
const T | Real () const |
const T | Imag () const |
void | SetReal (const T re) |
void | SetImag (const T im) |
const T | Mag () const |
returns magnitude | |
const T | SquaredMag () const |
returns squared magnitude | |
const T | Ang () const |
returns angle | |
Complex | ToPolar (const T &r, const T &theta) |
function to handle polar coordinates | |
Complex & | operator= (const T re) |
complex '=' operator (float) | |
Complex & | operator= (const Complex &rhs) |
complex '=' operator | |
Complex & | operator+= (const Complex &rhs) |
complex '+=' operator | |
Complex & | operator-= (const Complex &rhs) |
complex '-=' operator | |
Complex | operator+ (const Complex &rhs) const |
complex '+' operator | |
Complex | operator- (const Complex &rhs) const |
complex '-' operator | |
Complex | operator* (const Complex &rhs) const |
complex '*' operator | |
Complex | operator* (const T &scalar) const |
Product by a scalar. | |
Complex | operator/ (const Complex &rhs) const |
complex '/' operator | |
bool | operator== (const Complex &b) const |
complex '==' operator | |
bool | operator!= (const Complex &b) const |
complex '!=' operator |
Definition at line 33 of file Complex.hxx.
CLAM::Complex::Complex | ( | T | re = 0.f , |
|
T | im = 0.f | |||
) | [inline] |
Definition at line 41 of file Complex.hxx.
Referenced by operator*(), operator+(), operator-(), operator/(), and ToPolar().
CLAM::Complex::Complex | ( | const Complex & | rhs | ) | [inline] |
Definition at line 42 of file Complex.hxx.
const T CLAM::Complex::Ang | ( | ) | const [inline] |
const T CLAM::Complex::Imag | ( | ) | const [inline] |
Definition at line 45 of file Complex.hxx.
const T CLAM::Complex::Mag | ( | ) | const [inline] |
returns magnitude
Definition at line 51 of file Complex.hxx.
References CLAM::Abs(), and CLAM_sqrt().
bool CLAM::Complex::operator!= | ( | const Complex & | b | ) | const [inline] |
complex '!=' operator
Definition at line 155 of file Complex.hxx.
Complex CLAM::Complex::operator* | ( | const T & | scalar | ) | const [inline] |
complex '+=' operator
Definition at line 101 of file Complex.hxx.
complex '-=' operator
Definition at line 109 of file Complex.hxx.
complex '=' operator
Definition at line 92 of file Complex.hxx.
Complex& CLAM::Complex::operator= | ( | const T | re | ) | [inline] |
complex '=' operator (float)
Definition at line 84 of file Complex.hxx.
bool CLAM::Complex::operator== | ( | const Complex & | b | ) | const [inline] |
complex '==' operator
Definition at line 149 of file Complex.hxx.
const T CLAM::Complex::Real | ( | ) | const [inline] |
Definition at line 44 of file Complex.hxx.
void CLAM::Complex::SetImag | ( | const T | im | ) | [inline] |
Definition at line 48 of file Complex.hxx.
void CLAM::Complex::SetReal | ( | const T | re | ) | [inline] |
Definition at line 47 of file Complex.hxx.
const T CLAM::Complex::SquaredMag | ( | ) | const [inline] |
returns squared magnitude
Definition at line 64 of file Complex.hxx.
Complex CLAM::Complex::ToPolar | ( | const T & | r, | |
const T & | theta | |||
) | [inline] |
function to handle polar coordinates
Definition at line 76 of file Complex.hxx.
References CLAM_cos(), CLAM_sin(), and Complex().