golib  0.5
goComplex< T > Class Template Reference

Complex number class. More...

#include <gocomplex.h>

Public Member Functions

 goComplex (T r, T i=T(0))
 
 goComplex (const goComplex< T > &other)
 
T & re ()
 
T & im ()
 
const T & re () const
 
const T & im () const
 
 operator T ()
 
goComplex< T > operator* (const goComplex< T > &other) const
 
goComplex< T > & operator*= (const goComplex< T > &other)
 
goComplex< T > operator+ (const goComplex< T > &other) const
 
goComplex< T > & operator+= (const goComplex< T > &other)
 
goComplex< T > operator- (const goComplex< T > &other) const
 
goComplex< T > & operator-= (const goComplex< T > &other)
 
goComplex< T > operator/ (const goComplex< T > &other) const
 
goComplex< T > & operator/= (const goComplex< T > &other)
 
goComplex< T > & operator= (const goComplex< T > &other)
 
bool operator== (const goComplex< T > &other) const
 
bool operator!= (const goComplex< T > &other) const
 
bool operator> (const goComplex< T > &other) const
 
bool operator< (const goComplex< T > &other) const
 
void conjugate ()
 make conjugate complex number
 
goComplex< T > conj () const
 
goDouble arg () const
 
goDouble abs () const
 

Protected Attributes

real
 
ima
 

Detailed Description

template<class T>
class goComplex< T >

Complex number class.

Member Function Documentation

◆ abs()

template<class T >
goDouble goComplex< T >::abs ( ) const
inline

Calculate the absolute value of the complex number.

Returns
Absolute value of this complex number

◆ arg()

template<class T >
goDouble goComplex< T >::arg ( ) const
inline

Calculate the argument (phase angle) of the complex number.

Returns
Argument of this complex number.

The documentation for this class was generated from the following file: