Fix tests after recent refactor

This commit is contained in:
2021-06-29 19:52:57 -07:00
parent 78a360ae89
commit 3cf580f607
3 changed files with 69 additions and 66 deletions

View File

@@ -1,4 +1,4 @@
use rtchallenge::tuples::{point, vector, Tuple};
use rtchallenge::tuples::Tuple;
#[derive(Debug)]
struct Environment {
@@ -18,12 +18,12 @@ fn tick(env: &Environment, proj: &Projectile) -> Projectile {
}
fn main() {
let mut p = Projectile {
position: point(0., 1., 0.),
velocity: 4. * vector(1., 1., 0.).normalize(),
position: Tuple::point(0., 1., 0.),
velocity: 4. * Tuple::vector(1., 1., 0.).normalize(),
};
let e = Environment {
gravity: vector(0., -0.1, 0.).normalize(),
wind: vector(-0.01, 0., 0.),
gravity: Tuple::vector(0., -0.1, 0.).normalize(),
wind: Tuple::vector(-0.01, 0., 0.),
};
let mut i = 0;