From af98bc2fa66af2b4872b1d5c313a82b173b074cf Mon Sep 17 00:00:00 2001 From: Skye Terran Date: Mon, 9 Aug 2021 21:32:02 -0700 Subject: [PATCH] added simulate bool --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d82b388..e14e4ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,8 @@ struct PhysicsObject { } fn main() { + let mut simulate: bool = true; + // global time let mut time = Duration::new(0,0); @@ -24,12 +26,12 @@ fn main() { // create a test physics object let mut test_object = PhysicsObject { - location: [0.0, 0.0, 100.0], + location: [0.0, 0.0, 10.0], velocity: [0.0, 5.0, 0.0], gravity_enabled: true }; - loop { + while simulate { // start timing the loop let start_time = Instant::now();