rng-pack 0.2.5

Random number generator variety pack
Documentation
1
2
3
4
5
6
7
8
9
/// A trait for 64-bit random number generators.
pub trait Rng64 {
    /// Generates a random `i64` value in the range [min, max].
    fn randi(&mut self, min: i64, max: i64) -> i64;
    /// Generates a random `f64` value in the range [min, max).
    fn randf(&mut self, min: f64, max: f64) -> f64;
    /// Returns a random element from a slice.
    fn choice<'a, T>(&mut self, choices: &'a [T]) -> &'a T;
}