summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/fast_atan2f.cc
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2013-12-01 11:46:23 -0500
committerTom Rondeau <tom@trondeau.com>2013-12-01 11:46:23 -0500
commit55645df94f42be8991319ae78d760d3f8bbc48ed (patch)
treef2739e2bc20ddab89e879d26f81016ecd5fe4db9 /gnuradio-runtime/lib/math/fast_atan2f.cc
parent372081eb552242d947d6a93b7991c6077059a798 (diff)
math: fixes fast_atan2 float==0 check.
runtime: adds math functions to swig to make available as gr.function.
Diffstat (limited to 'gnuradio-runtime/lib/math/fast_atan2f.cc')
-rw-r--r--gnuradio-runtime/lib/math/fast_atan2f.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/math/fast_atan2f.cc b/gnuradio-runtime/lib/math/fast_atan2f.cc
index 3c4967d9ab..2cafeec520 100644
--- a/gnuradio-runtime/lib/math/fast_atan2f.cc
+++ b/gnuradio-runtime/lib/math/fast_atan2f.cc
@@ -132,7 +132,7 @@ namespace gr {
y_abs = fabsf(y);
x_abs = fabsf(x);
/* don't divide by zero! */
- if((y_abs < 1.5E-5) && (x_abs < 1.5E-5))
+ if(!((y_abs > 0.0f) || (x_abs > 0.0f)))
return 0.0;
//z = (y_abs < x_abs ? y_abs / x_abs : x_abs / y_abs);