diff options
author | trondeau | 2006-12-17 01:39:44 +0000 |
---|---|---|
committer | trondeau | 2006-12-17 01:39:44 +0000 |
commit | 367b9c4766edf249352e525411ad7da73ef62c05 (patch) | |
tree | 3001af58b0167b715f3607e31f2bb3d12bf952d8 /gnuradio-core | |
parent | 9d1f4b4603f181fb02100de77501ebbfd99f1df6 (diff) | |
download | gnuradio-367b9c4766edf249352e525411ad7da73ef62c05.tar.gz gnuradio-367b9c4766edf249352e525411ad7da73ef62c05.tar.bz2 gnuradio-367b9c4766edf249352e525411ad7da73ef62c05.zip |
Added fast atan with complex input
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4108 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core')
-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_ */ |