From b31c967ca04fc41e876bb7cf3b545246866b4b1d Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Wed, 15 Mar 2023 23:05:17 +0000 Subject: [PATCH] update lerp functionn --- src/render.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/render.rs b/src/render.rs index 83ddeee..271d345 100644 --- a/src/render.rs +++ b/src/render.rs @@ -335,16 +335,16 @@ impl Lerp for f64 { let change = (*other - self) * 0.1 * delta; - if change < 0.0000001 { - return *other; - } - let lerped = self + change; if *other != self { println!("c: {} target:{} lerp: {} diff: {} move: {}", self, other, lerped, diff, change); } + if change < 0.0000001 { + return *other; + } + lerped } }