From 06d08942f0400e5fedc52b80b1980c3bd3ec9a0f Mon Sep 17 00:00:00 2001 From: Jon Janzen Date: Sun, 7 Feb 2021 14:59:00 -0700 Subject: [PATCH] Played with values --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index b746f33..3fc15d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,7 +35,7 @@ impl Projectile { impl Projectile { fn tick(&mut self, env: &Environment) { self.position = self.position + self.velocity; - self.velocity = env.wind + env.gravity; + self.velocity = self.velocity + env.wind + env.gravity; } } @@ -57,7 +57,7 @@ fn main() { let mut ball = Projectile::new( Tuple::point(0.0, 0.0, 1.0), - Tuple::vector(1.0, 0.0, 0.0), + Tuple::vector(10.0, 0.0, 100.0), ); let mut tick = 0;