diff options
author | Tom Rondeau <tom@trondeau.com> | 2013-12-01 11:46:23 -0500 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2013-12-01 11:46:23 -0500 |
commit | 55645df94f42be8991319ae78d760d3f8bbc48ed (patch) | |
tree | f2739e2bc20ddab89e879d26f81016ecd5fe4db9 /gnuradio-runtime/lib/math/fast_atan2f.cc | |
parent | 372081eb552242d947d6a93b7991c6077059a798 (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.cc | 2 |
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); |