mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
added conj()
This commit is contained in:
parent
a3a2dbdc5f
commit
d72ca2727d
1 changed files with 6 additions and 0 deletions
|
|
@ -102,6 +102,12 @@ static constexpr Complex<T> operator / (Complex<T> a, Complex<T> b)
|
|||
(a.imag() * b.real() - a.real() * b.imag()) / (b.real() * b.real() + b.imag() * b.imag()));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static constexpr Complex<T> conj(Complex<T> a)
|
||||
{
|
||||
return Complex<T>(a.real(), -a.imag());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static constexpr T norm(Complex<T> a)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue