update diff target

This commit is contained in:
Andre Henriques 2023-03-15 23:00:06 +00:00
parent 0bce36f41d
commit cb9eb57a2c

View File

@ -331,11 +331,11 @@ pub trait Lerp {
impl Lerp for f64 {
fn lerp(self, other: &Self, diff: f64) -> Self {
let delta = diff / 1_000.0;
let delta = diff;
let lerped = self + ((*other - self) * 0.5 * delta);
if *other != self {
println!("c: {} target:{} lerp: {}", self, other, lerped);
println!("c: {} target:{} lerp: {} diff: {} move: {}", self, other, lerped, diff, (*other - self) * 0.5);
}
lerped