pub fn probability_to_bool(probability: f32) -> bool {
    let mut rng = rand::thread_rng();
    let random_number = rng.gen_range(0.0..1.0f32);
    random_number < probability
}
// Generates a random number, and returns true if it falls within the probability
Generates a random number, and returns true if it falls within the probability
Generates a random number and returns true if it falls within the probability
pub fn probability_to_bool(probability: f32) -> bool {
    let mut rng = rand::thread_rng();
    let random_number = rng.gen_range(0.0..1.0f32);
    random_number < probability
}
pub fn probability_to_bool ( probability : f32 ) -> bool { let mut rng = rand :: thread_rng ( ) ; let random_number = rng . gen_range ( 0.0 .. 1.0f32 ) ; random_number < probability }
Generates a random number, and returns true if it falls within the probability
Generates a random number and returns true if it falls within the probability
probability
f32