From 9e706fa8c9be0e7616cba22db29970d72ffddc41 Mon Sep 17 00:00:00 2001 From: annieversary Date: Sat, 23 Oct 2021 20:21:46 +0100 Subject: [PATCH] minor fix 23 --- crates/subtitled23/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/subtitled23/src/main.rs b/crates/subtitled23/src/main.rs index ce71225..d3fc1a4 100644 --- a/crates/subtitled23/src/main.rs +++ b/crates/subtitled23/src/main.rs @@ -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::>(); + points.push(Vec2::ZERO); let random = points[random_range(0, count)];