TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
Complex< T > Struct Template Reference
Inheritance diagram for Complex< T >:
sVec2< T >

Detailed Description

template<typename T>
struct ni::Complex< T >

Complex number template.

Public Member Functions

tBool IsReal () const
 Check whether the complex number is a pure real number. More...
 
tBool IsImaginary () const
 Check whether the complex number is a pure imaginary number. More...
 
tBool IsComplex () const
 Check whether the complex number is a complex number. More...
 
Complex operator+ () const
 positive sign More...
 
Complex operator- () const
 negate sign More...
 
Complexoperator+= (const ni::sVec2< T > &c)
 this += complex operator More...
 
Complexoperator+= (T s)
 this += scalar operator More...
 
Complex operator+ (const ni::sVec2< T > &c) const
 this + complex operator More...
 
Complex operator+ (T s) const
 this + scalar operator More...
 
Complexoperator-= (const ni::sVec2< T > &c)
 this -= complex operator More...
 
Complexoperator-= (T s)
 this -= scalar operator More...
 
Complex operator- (const ni::sVec2< T > &c) const
 this - complex operator More...
 
Complex operator- (T s) const
 this - scalar operator More...
 
Complexoperator*= (const ni::sVec2< T > &c)
 this *= complex operator More...
 
Complexoperator*= (T s)
 this *= scalar operator More...
 
Complex operator* (const ni::sVec2< T > &c) const
 this * complex operator More...
 
Complex operator* (T s) const
 this * scalar operator More...
 
Complex< T > Inverse () const
 inverse of this complex number More...
 
Complexoperator/= (const ni::sVec2< T > &c)
 this /= complex operator More...
 
Complexoperator/= (T s)
 this /= scalar operator More...
 
Complex operator/ (const ni::sVec2< T > &c) const
 this / complex operator More...
 
Complex operator/ (T s) const
 this / scalar operator More...
 
Complex Conjugate () const
 Conjugate. More...
 
Modulus () const
 Modulus. More...
 
ModulusSq () const
 Squared Modulus. More...
 
Argument () const
 Argument. More...
 
Complex< T > Sqrt () const
 Square root. More...
 
Complex< T > Exp () const
 Exponent. More...
 
Complex< T > Log10 () const
 Logarithm base 10. More...
 
Complex< T > LogE () const
 Logarithm base e. More...
 
Complex< T > Pow (const Complex< T > &b) const
 Power. More...
 
Complex< T > Sin () const
 Sinus. More...
 
Complex< T > Cos () const
 Cosinus. More...
 
Complex< T > Tan () const
 Tangent. More...
 
- Public Member Functions inherited from sVec2< T >
void Set (T _x, T _y=0)
 
void Set (const T *apV)
 
tSize size () const
 
T * ptr ()
 
const T * ptr () const
 
T & operator[] (int idx)
 
operator[] (int idx) const
 
T & re ()
 
const T & re () const
 
T & im ()
 
const T & im () const
 
T & E ()
 
const T & E () const
 
T & N ()
 
const T & N () const
 
sVec4< T > operator[] (const cchar *idx) const
 
bool operator< (const sVec2< T > &aR) const
 
bool operator<= (const sVec2< T > &aR) const
 
bool operator> (const sVec2< T > &aR) const
 
bool operator>= (const sVec2< T > &aR) const
 
bool operator== (const sVec2< T > &aR) const
 
bool operator!= (const sVec2< T > &aR) const
 
sVec2 operator+ () const
 
sVec2 operator- () const
 
sVec2operator+= (const sVec2< T > &v)
 
sVec2operator+= (T s)
 
sVec2 operator+ (const sVec2< T > &v) const
 
sVec2 operator+ (T s) const
 
sVec2operator-= (const sVec2< T > &v)
 
sVec2operator-= (T s)
 
sVec2 operator- (const sVec2< T > &v) const
 
sVec2 operator- (T s) const
 
sVec2operator*= (const sVec2< T > &v)
 
sVec2operator*= (T s)
 
sVec2 operator* (const sVec2< T > &v) const
 
sVec2 operator* (T s) const
 
sVec2operator/= (const sVec2< T > &v)
 
sVec2operator/= (T s)
 
sVec2 operator/ (const sVec2< T > &v) const
 
sVec2 operator/ (T s) const
 

Static Public Member Functions

static void _div (const T &ar, const T &ai, const T &br, const T &bi, T &rr, T &ri)
 helper complex division method More...
 
static void _div (const T &ar, const T &br, const T &bi, T &rr, T &ri)
 
- Static Public Member Functions inherited from sVec2< T >
static const sVec2Zero ()
 
static const sVec2One ()
 
static const sVec2Epsilon ()
 
static const sVec2XAxis ()
 
static const sVec2YAxis ()
 
static const sVec2OpXAxis ()
 
static const sVec2OpYAxis ()
 

Additional Inherited Members

- Public Attributes inherited from sVec2< T >
x
 
y
 

Member Function Documentation

tBool IsReal ( ) const

Check whether the complex number is a pure real number.

tBool IsImaginary ( ) const

Check whether the complex number is a pure imaginary number.

tBool IsComplex ( ) const

Check whether the complex number is a complex number.

Complex operator+ ( ) const

positive sign

Complex operator- ( ) const

negate sign

Complex& operator+= ( const ni::sVec2< T > &  c)

this += complex operator

Complex& operator+= ( s)

this += scalar operator

Complex operator+ ( const ni::sVec2< T > &  c) const

this + complex operator

Complex operator+ ( s) const

this + scalar operator

Complex& operator-= ( const ni::sVec2< T > &  c)

this -= complex operator

Complex& operator-= ( s)

this -= scalar operator

Complex operator- ( const ni::sVec2< T > &  c) const

this - complex operator

Complex operator- ( s) const

this - scalar operator

Complex& operator*= ( const ni::sVec2< T > &  c)

this *= complex operator

Complex& operator*= ( s)

this *= scalar operator

Complex operator* ( const ni::sVec2< T > &  c) const

this * complex operator

Complex operator* ( s) const

this * scalar operator

static void _div ( const T &  ar,
const T &  ai,
const T &  br,
const T &  bi,
T &  rr,
T &  ri 
)
static

helper complex division method

static void _div ( const T &  ar,
const T &  br,
const T &  bi,
T &  rr,
T &  ri 
)
static
Complex<T> Inverse ( ) const

inverse of this complex number

Complex& operator/= ( const ni::sVec2< T > &  c)

this /= complex operator

Complex& operator/= ( s)

this /= scalar operator

Complex operator/ ( const ni::sVec2< T > &  c) const

this / complex operator

Complex operator/ ( s) const

this / scalar operator

Complex Conjugate ( ) const

Conjugate.

T Modulus ( ) const

Modulus.

T ModulusSq ( ) const

Squared Modulus.

T Argument ( ) const

Argument.

Complex<T> Sqrt ( ) const

Square root.

Complex<T> Exp ( ) const

Exponent.

Complex<T> Log10 ( ) const

Logarithm base 10.

Complex<T> LogE ( ) const

Logarithm base e.

Complex<T> Pow ( const Complex< T > &  b) const

Power.

Complex<T> Sin ( ) const

Sinus.

Complex<T> Cos ( ) const

Cosinus.

Complex<T> Tan ( ) const

Tangent.