(seed: u32)
| 305 | } |
| 306 | |
| 307 | #[inline] |
| 308 | pub fn rand_in_circle(seed: u32) -> (f32, f32) { |
| 309 | let angle = rand01(seed) * std::f32::consts::TAU; |
| 310 | let radius = rand01(seed.wrapping_add(STREAM_GAMMA)).sqrt(); |
| 311 | (radius * angle.cos(), radius * angle.sin()) |
| 312 | } |
| 313 | |
| 314 | #[inline] |