addjust for diff values

This commit is contained in:
Andre Henriques 2023-03-15 23:10:03 +00:00
parent f31bc45947
commit 100f782aea

View File

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