Trait picorand::PicoRandRNG
source · pub trait PicoRandRNGwhere
Self::Input: TryFrom<u128>,
Self::Output: TryFrom<u128>,{
type Input;
type Output;
// Required methods
fn new(seed: Self::Input) -> Self;
fn rand(&mut self) -> Self::Output;
fn rand_range(&mut self, min: usize, max: usize) -> Self::Output;
}
Expand description
Requirements for compatible PRNG.
Required Associated Types§
Required Methods§
sourcefn rand_range(&mut self, min: usize, max: usize) -> Self::Output
fn rand_range(&mut self, min: usize, max: usize) -> Self::Output
Constrain a randomly generated number to a fixed range.