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 f8c1f76 commit caf811bCopy full SHA for caf811b
src/distributions/binomial.rs
@@ -64,7 +64,7 @@ impl Distribution<u64> for Binomial {
64
if expected < 25.0 {
65
let mut lresult = 0.0;
66
for _ in 0 .. self.n {
67
- if rng.gen::<f64>() < p {
+ if rng.gen_bool(p) {
68
lresult += 1.0;
69
}
70
0 commit comments