]> git.gag.com Git - debian/gnuradio/commitdiff
Added fast atan with complex input
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 17 Dec 2006 01:39:44 +0000 (01:39 +0000)
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 17 Dec 2006 01:39:44 +0000 (01:39 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4108 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/lib/general/gr_fast_atan2f.cc
gnuradio-core/src/lib/general/gr_math.h

index 121e63d5becc1925bf9f2b5772a0da9eca211e4d..25f550768eb940053e94befa0c585258131c5d21 100644 (file)
@@ -196,3 +196,4 @@ gr_fast_atan2f(REAL y, REAL x)
   return (angle);
 #endif
 }
+
index 059caf17f072dbda6b5545cc556ecb1c711256b4..86454e05d3db3a114b7101da657728d8000ff053 100644 (file)
@@ -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_ */