OpenToonz - An open-source full-featured 2D animation creation software
C
Fix: TCubic::getSpeed used an incorrect formula
Campbell Barton6e158de0e4b6
diff --git a/toonz/sources/common/tgeometry/tcurves.cpp b/toonz/sources/common/tgeometry/tcurves.cppindex 9d73f6af8..8aa424c9d 100644--- a/toonz/sources/common/tgeometry/tcurves.cpp+++ b/toonz/sources/common/tgeometry/tcurves.cpp@@ -338,7 +338,7 @@ TPointD TCubic::getPoint(double t) const {//-----------------------------------------------------------------------------TPointD TCubic::getSpeed(double t) const {double s = 1 - t;- return 3.0 * ((m_p1 - m_p0) * s * s + 2 * (m_p2 - m_p0) * s * t ++ return 3.0 * ((m_p1 - m_p0) * s * s + 2 * (m_p2 - m_p1) * s * t +(m_p3 - m_p2) * t * t);}//=============================================================================