Skip to main content

uniform

Function uniform 

Source
pub fn uniform<R: Rng + ?Sized>(rng: &mut R) -> f64
Expand description

Uniform draw on [0, 1) with 53 random bits: the top 53 bits of one next_u64(), scaled by the exact power of two 2^-53.

Every sampler in the crate maps raw words to uniform variates through this one function, so the mapping from a stream to physics is fixed in one place (the thread-count invariant of run_particles rests on it).