We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gen_bool
1 parent 087679b commit bd5ad92Copy full SHA for bd5ad92
src/distributions/binomial.rs
@@ -63,7 +63,7 @@ impl Distribution<u64> for Binomial {
63
if expected < 25.0 {
64
let mut lresult = 0.0;
65
for _ in 0 .. self.n {
66
- if rng.gen::<f64>() < p {
+ if rng.gen_bool(p) {
67
lresult += 1.0;
68
}
69
0 commit comments