Skip to content

Commit caf811b

Browse files
committed
Use gen_bool in Binomial distribution
1 parent f8c1f76 commit caf811b

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
@@ -64,7 +64,7 @@ impl Distribution<u64> for Binomial {
6464
if expected < 25.0 {
6565
let mut lresult = 0.0;
6666
for _ in 0 .. self.n {
67-
if rng.gen::<f64>() < p {
67+
if rng.gen_bool(p) {
6868
lresult += 1.0;
6969
}
7070
}

0 commit comments

Comments
 (0)