From 367b9c4766edf249352e525411ad7da73ef62c05 Mon Sep 17 00:00:00 2001 From: trondeau Date: Sun, 17 Dec 2006 01:39:44 +0000 Subject: Added fast atan with complex input git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4108 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/lib/general/gr_fast_atan2f.cc | 1 + gnuradio-core/src/lib/general/gr_math.h | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'gnuradio-core/src/lib/general') 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 + 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_ */ -- cgit