Fix incorrect interpolation for animation cubic bezier curves when falling back to bisection method

See #8401
This commit is contained in:
Kovid Goyal 2025-03-04 17:20:34 +05:30
parent 4d882eb633
commit 228d9cfc1c
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -135,6 +135,7 @@ solve_curve_x(const BezierParameters *p, double x, double epsilon) {
}
if (fabs(x2) < epsilon) return t2;
t0 = 0.0, t1 = 0.0, t2 = x, x2 = 0.0;
// Fall back to the bisection method for reliability.
unsigned iteration = 0;
while (t0 < t1 && iteration++ < max_bisection_iterations) {