HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
struct for representing complex numbers. More...
#include <Complex.h>
Public Member Functions | |
constexpr | Complex () |
constexpr | Complex (double real, double imag) |
constexpr Complex | operator- () const |
constexpr Complex | operator+ (double rhs) const |
constexpr Complex | operator+ (const Complex &rhs) const |
constexpr Complex & | operator+= (double rhs) |
constexpr Complex & | operator+= (const Complex &rhs) |
constexpr Complex | operator- (double rhs) const |
constexpr Complex | operator- (const Complex &rhs) const |
constexpr Complex & | operator-= (double rhs) |
constexpr Complex & | operator-= (const Complex &rhs) |
constexpr Complex | operator* (double rhs) const |
constexpr Complex | operator* (const Complex &rhs) const |
constexpr Complex & | operator*= (double rhs) |
constexpr Complex & | operator*= (const Complex &rhs) |
constexpr Complex | operator/ (double rhs) const |
constexpr Complex | operator/ (const Complex &rhs) const |
constexpr Complex & | operator/= (double rhs) |
constexpr Complex & | operator/= (const Complex &rhs) |
constexpr bool | operator== (const Complex &rhs) const |
constexpr bool | operator!= (const Complex &rhs) const |
constexpr Complex | Conjugate () const |
constexpr double | MagnitudeSquared () const |
double | Magnitude () const |
double | Phase () const |
Public Attributes | |
double | real |
double | imag |
struct for representing complex numbers.
|
inlineconstexpr |
creates a new instance and initializes it with default values.
|
inlineconstexpr |
creates a new instance and initializes it with the provided values.
real | real component of the complex number. |
imag | imaginary component of the complex number. |
|
inlineconstexpr |
calculates the complex conjugate of the current instance and returns it as a new instance.
|
inlineconstexpr |
calculates the squared magnitude of the current instance.
double Heph::Complex::Magnitude | ( | ) | const |
calculates the magnitude of the current instance.
double Heph::Complex::Phase | ( | ) | const |
calculates the phase of the current instance.
double Heph::Complex::real |
real component of the complex number.
double Heph::Complex::imag |
imaginary component of the complex number.