1 2 3 4 5 6 7 8 9 10
fn velocity(start: u32, end: u32, time: u32) -> u32 { if end < start { panic!("end < start"); } end - start / time } fn main() { println!("{}", velocity(5,15,4)); }