DATV demod: apply commit90c280f03339fe173baf2f908c37135b9b4c05bd Add complex ops.

pull/516/head
f4exb 2020-04-21 01:25:42 +02:00
rodzic 8f46029457
commit d0f97d0a5c
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -45,6 +45,11 @@ struct complex
im = re * c.im + im * c.re;
re = tre;
}
inline void operator-=(const complex<T> &x)
{
re-=x.re;
im-=x.im;
}
inline void operator*=(const T &k)
{
re *= k;
@ -58,6 +63,11 @@ complex<T> operator+(const complex<T> &a, const complex<T> &b)
return complex<T>(a.re + b.re, a.im + b.im);
}
template<typename T>
complex<T> operator -(const complex<T> &a, const complex<T> &b) {
return complex<T>(a.re - b.re, a.im - b.im);
}
template <typename T>
complex<T> operator*(const complex<T> &a, const complex<T> &b)
{