(state: &mut DefaultRand)
| 11 | } |
| 12 | |
| 13 | pub fn random_unit_vec(state: &mut DefaultRand) -> Vec3 { |
| 14 | let [x, y] = state.normal_f32_2(); |
| 15 | let z = state.normal_f32(); |
| 16 | Vec3::new(x, y, z) |
| 17 | } |
| 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 { |
no test coverage detected