Skip to content

Commit

Permalink
Use gen_bool in Binomial distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Mar 18, 2018
1 parent 087679b commit bd5ad92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distributions/binomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Distribution<u64> for Binomial {
if expected < 25.0 {
let mut lresult = 0.0;
for _ in 0 .. self.n {
if rng.gen::<f64>() < p {
if rng.gen_bool(p) {
lresult += 1.0;
}
}
Expand Down

0 comments on commit bd5ad92

Please sign in to comment.