Skip to main content

sample_sphere_volume

Function sample_sphere_volume 

Source
pub fn sample_sphere_volume(rng: &mut Lcg) -> [f64; 3]
Expand description

Sample a point uniformly inside the closed unit ball (rejection sampling).

Returns [x, y, z] with x² + y² + z² ≤ 1.