Played with values

This commit is contained in:
Jon Janzen
2021-02-07 14:59:00 -07:00
parent bf1afc092e
commit 06d08942f0

View File

@@ -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;