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... | |
| Complex & | operator+= (const ni::sVec2< T > &c) |
| this += complex operator More... | |
| Complex & | operator+= (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 & | operator-= (const ni::sVec2< T > &c) |
| this -= complex operator More... | |
| Complex & | operator-= (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 & | operator*= (const ni::sVec2< T > &c) |
| this *= complex operator More... | |
| Complex & | operator*= (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... | |
| Complex & | operator/= (const ni::sVec2< T > &c) |
| this /= complex operator More... | |
| Complex & | operator/= (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... | |
| T | Modulus () const |
| Modulus. More... | |
| T | ModulusSq () const |
| Squared Modulus. More... | |
| T | 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) |
| T | 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 |
| sVec2 & | operator+= (const sVec2< T > &v) |
| sVec2 & | operator+= (T s) |
| sVec2 | operator+ (const sVec2< T > &v) const |
| sVec2 | operator+ (T s) const |
| sVec2 & | operator-= (const sVec2< T > &v) |
| sVec2 & | operator-= (T s) |
| sVec2 | operator- (const sVec2< T > &v) const |
| sVec2 | operator- (T s) const |
| sVec2 & | operator*= (const sVec2< T > &v) |
| sVec2 & | operator*= (T s) |
| sVec2 | operator* (const sVec2< T > &v) const |
| sVec2 | operator* (T s) const |
| sVec2 & | operator/= (const sVec2< T > &v) |
| sVec2 & | operator/= (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 sVec2 & | Zero () |
| static const sVec2 & | One () |
| static const sVec2 & | Epsilon () |
| static const sVec2 & | XAxis () |
| static const sVec2 & | YAxis () |
| static const sVec2 & | OpXAxis () |
| static const sVec2 & | OpYAxis () |
Additional Inherited Members | |
Public Attributes inherited from sVec2< T > | |
| T | x |
| T | y |
| 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+= | ( | T | s | ) |
this += scalar operator
| Complex operator+ | ( | T | s | ) | const |
this + scalar operator
| Complex& operator-= | ( | T | s | ) |
this -= scalar operator
| Complex operator- | ( | T | s | ) | const |
this - scalar operator
| Complex& operator*= | ( | T | s | ) |
this *= scalar operator
| Complex operator* | ( | T | s | ) | const |
this * scalar operator
|
static |
helper complex division method
|
static |
| Complex<T> Inverse | ( | ) | const |
inverse of this complex number
| Complex& operator/= | ( | T | s | ) |
this /= scalar operator
| Complex operator/ | ( | T | 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> Sin | ( | ) | const |
Sinus.
| Complex<T> Cos | ( | ) | const |
Cosinus.
| Complex<T> Tan | ( | ) | const |
Tangent.
1.8.7