(&mut self)
| 50 | } |
| 51 | |
| 52 | fn normal_f32_2(&mut self) -> [f32; 2] { |
| 53 | let u1 = self.uniform_f32(); |
| 54 | let u2 = self.uniform_f32(); |
| 55 | |
| 56 | [ |
| 57 | (-2.0 * u1.ln()).sqrt() * ((f32::consts::PI * 2.0) * u2).cos(), |
| 58 | (-2.0 * u1.ln()).sqrt() * ((f32::consts::PI * 2.0) * u2).sin(), |
| 59 | ] |
| 60 | } |
| 61 | |
| 62 | fn normal_f64_2(&mut self) -> [f64; 2] { |
| 63 | let u1 = self.uniform_f64(); |
no test coverage detected