summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/random.cc
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2016-05-30 14:08:07 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2016-05-30 14:08:07 -0700
commitc034036fbb0a097b2ccbbacdfdb113f8355cdbcc (patch)
tree12366caf390de89db7e7e32646b08854c8f01bc5 /gnuradio-runtime/lib/math/random.cc
parent11ce2621937e6fa1d5440c8f485c7a27b9d34d27 (diff)
parentc5f7b07aff9320e3d13bb8d26aa4dc43093e569a (diff)
Merge branch 'next' into 'next-qt5'
Diffstat (limited to 'gnuradio-runtime/lib/math/random.cc')
-rw-r--r--gnuradio-runtime/lib/math/random.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/math/random.cc b/gnuradio-runtime/lib/math/random.cc
index 5e16c96ea4..35f63076b2 100644
--- a/gnuradio-runtime/lib/math/random.cc
+++ b/gnuradio-runtime/lib/math/random.cc
@@ -127,7 +127,7 @@ namespace gr {
x = 2.0*ran1()-1.0;
y = 2.0*ran1()-1.0;
s = x*x+y*y;
- }while(not(s<1.0));
+ }while(s >= 1.0f || s == 0.0f);
d_gauss_stored = true;
d_gauss_value = x*sqrt(-2.0*log(s)/s);
return y*sqrt(-2.0*log(s)/s);