// make sure the velocity doesn't go too fast
make sure the velocity doesn't go too fast
make sure the velocity doesn ' t go too fast
fn limit_speed(&self, v: f64) -> f64 {
        if v > MAX_SPEED {
            MAX_SPEED
        } else if v < -MAX_SPEED {
            -MAX_SPEED
        } else {
            v
        }
    }
fn limit_speed ( & self , v : f64 ) -> f64 { if v > MAX_SPEED { MAX_SPEED } else if v < - MAX_SPEED { - MAX_SPEED } else { v } }
make sure the velocity doesn't go too fast
make sure the velocity doesn ' t go too fast
&self
v
f64