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 21, 2018
1 parent 19001e6 commit d157ad6
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 @@ -64,7 +64,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 d157ad6

Please sign in to comment.