From 540af201742cbac04ea85fa8b7843d405dc58dd9 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Wed, 15 Mar 2023 22:51:15 +0000 Subject: [PATCH] update delta diff --- src/render.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render.rs b/src/render.rs index 92dba7c..44b5936 100644 --- a/src/render.rs +++ b/src/render.rs @@ -336,7 +336,7 @@ pub trait Lerp { impl Lerp for u8 { fn lerp(self, other: &Self, diff: f64) -> Self { - let delta = diff / 1000.0; + let delta = diff / 1_000_000.0; ((self as f64) + (((*other as f64) - (self as f64)) * 0.5 * delta)) as u8 }