diff --git a/plugins/channelrx/demoddatv/leansdr/math.h b/plugins/channelrx/demoddatv/leansdr/math.h index 3a6d84a7c..bb1c98397 100644 --- a/plugins/channelrx/demoddatv/leansdr/math.h +++ b/plugins/channelrx/demoddatv/leansdr/math.h @@ -45,6 +45,11 @@ struct complex im = re * c.im + im * c.re; re = tre; } + inline void operator-=(const complex &x) + { + re-=x.re; + im-=x.im; + } inline void operator*=(const T &k) { re *= k; @@ -58,6 +63,11 @@ complex operator+(const complex &a, const complex &b) return complex(a.re + b.re, a.im + b.im); } +template +complex operator -(const complex &a, const complex &b) { + return complex(a.re - b.re, a.im - b.im); +} + template complex operator*(const complex &a, const complex &b) {