Skip to content

Commit bd5ad92

Browse files
committed
Use gen_bool in Binomial distribution
1 parent 087679b commit bd5ad92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/distributions/binomial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Distribution<u64> for Binomial {
6363
if expected < 25.0 {
6464
let mut lresult = 0.0;
6565
for _ in 0 .. self.n {
66-
if rng.gen::<f64>() < p {
66+
if rng.gen_bool(p) {
6767
lresult += 1.0;
6868
}
6969
}

0 commit comments

Comments
 (0)