summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/math/random.cc
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-06-10 15:15:16 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-07-13 16:30:36 +0200
commit893b74c770b81f2c09094577e2de720155f84b61 (patch)
treece430f554cf032c70eab8a95228731afbffc6efd /gnuradio-runtime/lib/math/random.cc
parent7ac7cf6246e4d984d36c64df10ba4d2b2f6b2204 (diff)
parent6fb0ff274a05daf2f2677af14337704fb88081f7 (diff)
Merge remote-tracking branch 'grcwg/next_grcwg' into gtk3
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);