From 11c776c2a9059cd073d376632c829e0c6156b085 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Wed, 15 Mar 2023 23:23:08 +0000 Subject: [PATCH] update to have diff abs --- src/render.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render.rs b/src/render.rs index 1528f9c..f5de026 100644 --- a/src/render.rs +++ b/src/render.rs @@ -341,7 +341,7 @@ impl Lerp for f64 { println!("c: {} target:{} lerp: {} move: {}", self, other, lerped, change); } - if (*other - self) < 2.0 && diff != 0.0 { + if (*other - self).abs() < 2.0 && diff != 0.0 { return *other; }