added conj()

This commit is contained in:
Ahmet Inan 2019-02-06 14:27:03 +01:00
commit d72ca2727d

View file

@ -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)
{