Skip to main content

sample_gaussian_3d

Function sample_gaussian_3d 

Source
pub fn sample_gaussian_3d(sigma: f64, rng: &mut ParticleRng) -> [f64; 3]
Expand description

Three independent Gaussian components of standard deviation sigma (m), by Box-Muller (module docs). Consumes exactly six u64 words from rng whatever sigma is; sigma = 0 gives components equal to zero (possibly -0.0).