eoc2: update with initial values from the book.
This commit is contained in:
parent
709465dafe
commit
c9ec19c3cd
@ -35,14 +35,12 @@ fn draw_dot(c: &mut Canvas, x: usize, y: usize) {
|
|||||||
c.set(x + 1, y + 1, red);
|
c.set(x + 1, y + 1, red);
|
||||||
}
|
}
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let mut p = Projectile {
|
let position = point(0., 1., 0.);
|
||||||
position: point(0., 1., 0.),
|
let velocity = vector(1., 1.8, 0.).normalize() * 11.25;
|
||||||
velocity: 10. * vector(1., 2., 0.).normalize(),
|
let mut p = Projectile { position, velocity };
|
||||||
};
|
let gravity = vector(0., -0.1, 0.);
|
||||||
let e = Environment {
|
let wind = vector(-0.01, 0., 0.);
|
||||||
gravity: vector(0., -0.1, 0.),
|
let e = Environment { gravity, wind };
|
||||||
wind: vector(-0.01, 0., 0.),
|
|
||||||
};
|
|
||||||
|
|
||||||
let w = 800;
|
let w = 800;
|
||||||
let h = 600;
|
let h = 600;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user