mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-28 05:02:25 -04:00
DATV demod: apply commit90c280f03339fe173baf2f908c37135b9b4c05bd Add complex ops.
This commit is contained in:
parent
8f46029457
commit
d0f97d0a5c
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user