bezier: try lower precision epsilon

This commit is contained in:
itsmattkc
2021-08-14 16:34:47 -07:00
parent c8c361e67d
commit 0a06fcf67e
+1 -1
View File
@@ -61,7 +61,7 @@ double Bezier::CalculateTFromX(bool cubic, double x, double a, double b, double
double mid = (bottom + top) * 0.5;
double test = cubic ? CubicTtoY(a, b, c, d, mid) : QuadraticTtoY(a, b, c, mid);
if (qFuzzyCompare(test, x)) {
if (qAbs(test - x) < 0.000001) {
return mid;
} else if (x > test) {
bottom = mid;