Skip to main content

default_rng

Function default_rng 

Source
pub fn default_rng() -> Generator<Xoshiro256StarStar>
Expand description

Create a Generator with the default BitGenerator (Xoshiro256**) seeded from a non-deterministic source (using the system time as a simple entropy source).

ยงExample

let mut rng = ferray_random::default_rng();
let val = rng.next_f64();
assert!((0.0..1.0).contains(&val));