update delta diff

This commit is contained in:
Andre Henriques 2023-03-15 22:51:15 +00:00
parent 0fdba152d6
commit 540af20174

View File

@ -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
}