mirror of https://github.com/Chlumsky/msdfgen.git
Partial revert of cubic curve distance
This commit is contained in:
parent
15833154b3
commit
9e7901aa7c
|
|
@ -255,11 +255,11 @@ SignedDistance CubicSegment::signedDistance(Point2 origin, double ¶m) const
|
||||||
break;
|
break;
|
||||||
qe = qa+3*t*ab+3*t*t*br+t*t*t*as;
|
qe = qa+3*t*ab+3*t*t*br+t*t*t*as;
|
||||||
d1 = 3*ab+6*t*br+3*t*t*as;
|
d1 = 3*ab+6*t*br+3*t*t*as;
|
||||||
}
|
double distance = qe.length();
|
||||||
double distance = qe.length();
|
if (distance < fabs(minDistance)) {
|
||||||
if (distance < fabs(minDistance)) {
|
minDistance = nonZeroSign(crossProduct(d1, qe))*distance;
|
||||||
minDistance = nonZeroSign(crossProduct(d1, qe))*distance;
|
param = t;
|
||||||
param = t;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue