[][src]Function tray_rust::mc::cos_sample_hemisphere

pub fn cos_sample_hemisphere(u: &(f32, f32)) -> Vector

Sample a hemisphere using a cosine distribution to produce cosine weighted samples samples should be two random samples in range [0, 1) directions returned will be in the hemisphere around (0, 0, 1)