Compare commits
No commits in common. "cb9eb57a2c525827a1ef2f58199d0063e208059e" and "be35ecb310bfd6b0d58d3c43de6b33ff9784898f" have entirely different histories.
cb9eb57a2c
...
be35ecb310
@ -331,11 +331,11 @@ pub trait Lerp {
|
|||||||
|
|
||||||
impl Lerp for f64 {
|
impl Lerp for f64 {
|
||||||
fn lerp(self, other: &Self, diff: f64) -> Self {
|
fn lerp(self, other: &Self, diff: f64) -> Self {
|
||||||
let delta = diff;
|
let delta = diff / 1_000_000.0;
|
||||||
let lerped = self + ((*other - self) * 0.5 * delta);
|
let lerped = self + ((*other - self) * 0.5 * delta);
|
||||||
|
|
||||||
if *other != self {
|
if *other != self {
|
||||||
println!("c: {} target:{} lerp: {} diff: {} move: {}", self, other, lerped, diff, (*other - self) * 0.5);
|
println!("c: {} target:{} lerp: {}", self, other, lerped);
|
||||||
}
|
}
|
||||||
|
|
||||||
lerped
|
lerped
|
||||||
|
Loading…
Reference in New Issue
Block a user