Skip to main content

should_sample

Function should_sample 

Source
pub fn should_sample(uniform_0_1: f64) -> bool
Expand description

Decide whether to sample a recall touch for shadow observation.

Combines shadow_enabled with sample_rate and a caller- supplied uniform-[0, 1) random number. Pulled apart so tests can inject a deterministic value without touching the global RNG.