added more logging to lerp to debug the flash
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andre Henriques 2023-03-19 09:31:02 +00:00
parent c56823eb31
commit 62b9a6acd5

View File

@ -317,7 +317,7 @@ impl Render {
let lerp_data: Vec<RGB<f64>> = data.iter().zip(&self.last).map(|(d, l)| l.lerp(d, delta as f64)).collect();
//println!("d:{:?}\n l:{:?}", data, lerp_data);
println!("d:{:?}\n l:{:?}", data[25], lerp_data[25]);
let to_set_data: Vec<RGB<u8>> = rgbs_f64_to_u8(&lerp_data);
@ -380,16 +380,12 @@ impl Lerp for f64 {
let lerped = self + change;
if *other != self && diff != 0.0 {
println!("c: {} target:{} lerp: {} move: {}", self, other, lerped, change);
}
if (*other - self).abs() < 2.0 && diff != 0.0 {
return *other;
}
*other
} else {
lerped
}
}
}
impl Lerp for RGB<f64> {