Trait nanorand::gen::RandomRange

source ·
pub trait RandomRange<Generator: Rng<OUTPUT>, const OUTPUT: usize>: RandomGen<Generator, OUTPUT> {
    fn random_range<Bounds: RangeBounds<Self>>(
        nng: &mut Generator,
        range: Bounds
    ) -> Self; }
Expand description

A trait used for generating a random number within a range, with an RNG,

Required Methods§

Return a ranged number of the implementing type, from the specified RNG instance.

Panics

This function will panic if the lower bound of the range is greater than the upper bound.

Implementations on Foreign Types§

Implementors§