CLAM::Complex Class Reference

#include <Complex.hxx>

List of all members.

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
Complexoperator= (const T re)
 complex '=' operator (float)
Complexoperator= (const Complex &rhs)
 complex '=' operator
Complexoperator+= (const Complex &rhs)
 complex '+=' operator
Complexoperator-= (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

Detailed Description

Definition at line 33 of file Complex.hxx.


Constructor & Destructor Documentation

CLAM::Complex::Complex ( re = 0.f,
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.


Member Function Documentation

const T CLAM::Complex::Ang (  )  const [inline]

returns angle

Definition at line 70 of file Complex.hxx.

References CLAM_atan2().

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]

Product by a scalar.

Definition at line 135 of file Complex.hxx.

References Complex().

Complex CLAM::Complex::operator* ( const Complex rhs  )  const [inline]

complex '*' operator

Definition at line 129 of file Complex.hxx.

References Complex().

Complex CLAM::Complex::operator+ ( const Complex rhs  )  const [inline]

complex '+' operator

Definition at line 117 of file Complex.hxx.

References Complex().

Complex& CLAM::Complex::operator+= ( const Complex rhs  )  [inline]

complex '+=' operator

Definition at line 101 of file Complex.hxx.

Complex CLAM::Complex::operator- ( const Complex rhs  )  const [inline]

complex '-' operator

Definition at line 123 of file Complex.hxx.

References Complex().

Complex& CLAM::Complex::operator-= ( const Complex rhs  )  [inline]

complex '-=' operator

Definition at line 109 of file Complex.hxx.

Complex CLAM::Complex::operator/ ( const Complex rhs  )  const [inline]

complex '/' operator

Definition at line 141 of file Complex.hxx.

References Complex().

Complex& CLAM::Complex::operator= ( const Complex rhs  )  [inline]

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().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.3