minor fix 23

main
annieversary 2021-10-23 20:21:46 +01:00
parent 92214054f9
commit 9e706fa8c9
1 changed files with 2 additions and 1 deletions

View File

@ -20,9 +20,10 @@ fn model(_app: &App) -> Model {
fn advance(point: Vec2, t: f32) -> Vec2 {
// pick a random point
let count = ((t * 0.125).trunc() as usize % 5) + 3;
let points = (0..count)
let mut points = (0..count)
.map(|i| (TAU * i as f32 / count as f32).sin_cos().to_vec2())
.collect::<Vec<_>>();
points.push(Vec2::ZERO);
let random = points[random_range(0, count)];