Skip to content

Commit

Permalink
correct dt logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sparshg authored Sep 18, 2023
1 parent 9c89d99 commit 9a8b8f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Cart {
pub fn update(&mut self, dt: f64) {
self.camera.update(self.state.x, self.state.v, dt);
let steps = if dt > 0.02 {
(60. * dt) as i32
((self.steps * 60) as f32 * dt) as i32
} else {
self.steps
};
Expand Down

0 comments on commit 9a8b8f7

Please sign in to comment.