Skip to main content

Module random

Module random 

Source
Expand description

Random helpers so you do not need an extra crate for the basics.

Functionsยง

chance
Returns true with the given probability (0.0 to 1.0).
int
Random integer in min..=max.
pick
Picks a random element, or None for an empty slice.
range
Random float in min..max.
seed
Seeds the random generator for reproducible results.