Creates a random vector with each element being in the range of [-1.0, 1.0] (signed normalized).
(state: &mut DefaultRand)
| 18 | |
| 19 | /// Creates a random vector with each element being in the range of [-1.0, 1.0] (signed normalized). |
| 20 | pub fn random_snorm_vec(state: &mut DefaultRand) -> Vec3 { |
| 21 | random_unit_vec(state).map(norm_f32_to_snorm) |
| 22 | } |
| 23 | |
| 24 | pub fn random_in_unit_sphere(state: &mut DefaultRand) -> Vec3 { |
| 25 | loop { |
no test coverage detected