From 460dcd7ab44ca6c3df435b33a43e698f17335c3b Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 2 Mar 2023 18:57:53 +1300 Subject: [PATCH] slight tweak to allow close to fixed to be fixed --- 84_Super_Star_Trek/rust/src/model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/84_Super_Star_Trek/rust/src/model.rs b/84_Super_Star_Trek/rust/src/model.rs index f502a13f..a55eb62f 100644 --- a/84_Super_Star_Trek/rust/src/model.rs +++ b/84_Super_Star_Trek/rust/src/model.rs @@ -85,7 +85,7 @@ impl Enterprise { pub fn repair_system(&mut self, system: &str, amount: f32) -> bool { let existing_damage = self.damaged[system]; - if existing_damage + amount >= 0.0 { + if existing_damage + amount >= -0.1 { self.damaged.remove(system); return true; }