Fix quadratic derivative

This commit is contained in:
Patrick Walton 2018-12-21 11:34:10 -08:00
parent 6ed839a14b
commit 5442f81fea
1 changed files with 1 additions and 1 deletions

View File

@ -1649,7 +1649,7 @@ impl SolveT for QuadraticAxis {
lerp(lerp(self.from, self.ctrl, t), lerp(self.ctrl, self.to, t), t)
}
fn sample_deriv(&self, t: f32) -> f32 {
2.0 * (self.to - 2.0 * self.ctrl + self.from)
2.0 * lerp(self.ctrl - self.from, self.to - self.ctrl, t)
}
}