pub trait Numwhere
    Self: Float + FloatConst + NumCast + NumAssignOps + SampleUniform,{
    // Required method
    fn sample_open_closed_01<R: Rng + ?Sized>(rng: &mut R) -> Self;
}
Expand description

Numbers supported by generic items of this module.

Required Methods§

source

fn sample_open_closed_01<R: Rng + ?Sized>(rng: &mut R) -> Self

Generate number between zero (exclusive) and one (inclusive).

This method is needed due to Rust issue #20671: it avoids having to add OpenClosed01: Distribution<T> bounds.

Implementors§