23 #ifndef EDSP_COMPLEX_H 24 #define EDSP_COMPLEX_H 26 #include <edsp/meta/unused.hpp> 32 namespace edsp {
inline namespace math {
50 constexpr T
phase(
const std::complex<T>& z) {
60 constexpr T
real(
const std::complex<T>& z) {
70 constexpr T
imag(
const std::complex<T>& z) {
80 constexpr std::complex<T>
conj(
const std::complex<T>& z) {
90 constexpr
auto is_nan(
const std::complex<T>& z) noexcept {
91 return std::isnan(z.real()) || std::isnan(z.imag());
100 constexpr
auto is_inf(
const std::complex<T>& z) noexcept {
101 return std::isinf(z.real()) || std::isinf(z.imag());
108 template <
typename T>
constexpr auto is_inf(const std::complex< T > &z) noexcept
Determines if the given real or imaginary part of the complex number is .
Definition: complex.hpp:100
constexpr T real(const std::complex< T > &z)
Computes the real component of the complex number z.
Definition: complex.hpp:60
constexpr T imag(const std::complex< T > &z)
Computes the imaginary component of the complex number z.
Definition: complex.hpp:70
constexpr T phase(const std::complex< T > &z)
Computes the phase of the complex number z.
Definition: complex.hpp:50
constexpr T magnitude(const std::complex< T > &z)
Computes the magnitude of the complex number z.
Definition: complex.hpp:40
constexpr std::complex< T > conj(const std::complex< T > &z)
Computes the complex conjugate of the complex number z.
Definition: complex.hpp:80
constexpr auto is_nan(const std::complex< T > &z) noexcept
Determines if the given real or imaginary part of the complex number is a not-a-number (NaN) value...
Definition: complex.hpp:90
Definition: amplifier.hpp:29
constexpr std::complex< T > infinity() noexcept
Computes an complex number.
Definition: complex.hpp:109