use kestrel; fn main() { let delays = [8, 24, 9, 100, 15]; let mut carry = 0.0; let mut ball = [2.0, 1.0]; let mut previous = 2.0; let mut lost = 0.0; let mut frame = 0; while frame < len(delays) { let clock = ke_clock(carry, at(delays, frame), 10.0, 3); carry = at(clock, 1); lost += at(clock, 2); let mut remaining = at(clock, 0); while remaining > 0.0 { previous = at(ball, 0); ball = ke_bounce(previous, at(ball, 1), 1.0, 0.0, 8.0); remaining -= 1.0; } print!("frame "); print!(frame); print!(" x="); println!(ke_lerp(previous, at(ball, 0), at(clock, 3))); frame += 1; } print!("dropped ms="); println!(lost); }