Skip to main content

roll_fraction

Function roll_fraction 

Source
fn roll_fraction() -> f64
Expand description

Draws a pseudo-random fraction in [0.0, 1.0).

Uses a freshly seeded RandomState hasher (new per-call keys) rather than a rand crate — the same cheap, statistically casual source the fault-injection plugin uses for sampling. Not cryptographic and not a deterministic sequence; good enough for sample_ratio.