summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/general/gr_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/general/gr_math.h')
-rw-r--r--gnuradio-core/src/lib/general/gr_math.h7
1 files changed, 7 insertions, 0 deletions
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_ */