diff options
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_fast_atan2f.cc | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_math.h | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/general/gr_fast_atan2f.cc b/gnuradio-core/src/lib/general/gr_fast_atan2f.cc index 121e63d5b..25f550768 100644 --- a/gnuradio-core/src/lib/general/gr_fast_atan2f.cc +++ b/gnuradio-core/src/lib/general/gr_fast_atan2f.cc @@ -196,3 +196,4 @@ gr_fast_atan2f(REAL y, REAL x) return (angle); #endif } + diff --git a/gnuradio-core/src/lib/general/gr_math.h b/gnuradio-core/src/lib/general/gr_math.h index 059caf17f..86454e05d 100644 --- a/gnuradio-core/src/lib/general/gr_math.h +++ b/gnuradio-core/src/lib/general/gr_math.h @@ -27,6 +27,8 @@ #ifndef _GR_MATH_H_ #define _GR_MATH_H_ +#include <gr_complex.h> + long gr_gcd (long m, long n); // returns a non-zero value if value is "not-a-number" (NaN), and 0 otherwise @@ -57,4 +59,9 @@ int gr_signbit (double x); */ float gr_fast_atan2f(float y, float x); +static inline float gr_fast_atan2f(gr_complex z) +{ + return gr_fast_atan2f(z.imag(), z.real()); +} + #endif /* _GR_MATH_H_ */ |