From 100f782aeaf281a27c2dd419552b3966ca29f549 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Wed, 15 Mar 2023 23:10:03 +0000 Subject: [PATCH] addjust for diff values --- src/render.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/render.rs b/src/render.rs index 39db773..8269170 100644 --- a/src/render.rs +++ b/src/render.rs @@ -333,15 +333,15 @@ impl Lerp for f64 { fn lerp(self, other: &Self, diff: f64) -> Self { let delta = diff; - let change = (*other - self) * 0.1 * delta; + let change = (*other - self) * 0.2 * delta; let lerped = self + change; - if *other != self { - println!("c: {} target:{} lerp: {} diff: {} move: {}", self, other, lerped, diff, change); + if *other != self && diff != 0.0 { + println!("c: {} target:{} lerp: {} move: {}", self, other, lerped, change); } - if change < 0.0000001 && diff != 0.0 { + if change < 0.001 && diff != 0.0 { return *other; }