diff --git a/rtchallenge/examples/eoc2.rs b/rtchallenge/examples/eoc2.rs index 885af1f..a40b12f 100644 --- a/rtchallenge/examples/eoc2.rs +++ b/rtchallenge/examples/eoc2.rs @@ -35,14 +35,12 @@ fn draw_dot(c: &mut Canvas, x: usize, y: usize) { c.set(x + 1, y + 1, red); } fn main() -> Result<()> { - let mut p = Projectile { - position: point(0., 1., 0.), - velocity: 10. * vector(1., 2., 0.).normalize(), - }; - let e = Environment { - gravity: vector(0., -0.1, 0.), - wind: vector(-0.01, 0., 0.), - }; + let position = point(0., 1., 0.); + let velocity = vector(1., 1.8, 0.).normalize() * 11.25; + let mut p = Projectile { position, velocity }; + let gravity = vector(0., -0.1, 0.); + let wind = vector(-0.01, 0., 0.); + let e = Environment { gravity, wind }; let w = 800; let h = 600;