Function random_bool
fn random_bool(p: f64) -> bool
Return a bool with a probability p of being true.
This function is shorthand for
[rng()].random_bool(p).
Example
println!;
Panics
If p < 0 or p > 1.
random_boolfn random_bool(p: f64) -> bool
Return a bool with a probability p of being true.
This function is shorthand for
[rng()].random_bool(p).
println!;
If p < 0 or p > 1.