|
Yate
|
A Complex (float) number. More...
#include <yatemath.h>
Public Member Functions | |
| Complex () | |
| Complex (float real, float imag=0) | |
| Complex (const Complex &c) | |
| float | re () const |
| void | re (float r) |
| float | im () const |
| void | im (float i) |
| Complex & | set (float r=0, float i=0) |
| bool | operator== (const Complex &c) const |
| bool | operator!= (const Complex &c) const |
| Complex & | operator= (const Complex &c) |
| Complex & | operator= (float real) |
| Complex & | operator+= (const Complex &c) |
| Complex & | operator+= (float real) |
| Complex & | operator-= (const Complex &c) |
| Complex & | operator-= (float real) |
| Complex & | operator*= (const Complex &c) |
| Complex & | operator*= (float f) |
| Complex & | operator/= (const Complex &c) |
| Complex & | operator/= (float f) |
| float | abs () const |
| float | mod () const |
| float | arg () const |
| Complex | exp () const |
| float | norm () const |
| float | norm2 () const |
A Complex (float) number.
This class implements a complex number
|
inline |
Constructor
Referenced by Complex(), exp(), operator!=(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator/=(), operator=(), operator=(), operator==(), and set().
|
inline |
Constructor
| real | The real part of the complex number |
| imag | The imaginary part of a complex number |
|
inline |
|
inline |
Compute the the argument of this complex number
|
inline |
|
inline |
Obtain the imaginary part of a complex number
|
inline |
Set the imaginary part of the complex number
| i | The new imaginary part value |
|
inline |
|
inline |
|
inline |
Compute the norm2 value of this complex number
Referenced by abs(), and operator/=().
|
inline |
|
inline |
|
inline |
Addition operator. Add a value to the real part
| real | Value to add to real part |
References Complex().
|
inline |
Substraction operator. Substract a value a value from the real part
| real | Value to substract from real part |
References Complex().
|
inline |
|
inline |
|
inline |
|
inline |
Obtain the real part of the complex number
|
inline |
Set the real part of the complex number
| r | The new real part value |
|
inline |
Set data
| r | The real part of the complex number |
| i | The imaginary part of a complex number |
References Complex().
Referenced by operator*=(), operator*=(), operator+=(), operator-=(), operator/=(), operator/=(), operator=(), and operator=().