Adjust precision of Curve#isFlatEnough() to cover rare edge cases.

This commit is contained in:
Jürg Lehni 2013-05-03 21:00:37 -07:00
parent af51edda34
commit 3101989974

View file

@ -654,7 +654,7 @@ statics: {
vx = 3 * c2x - 2 * p2x - p1x,
vy = 3 * c2y - 2 * p2y - p1y;
return Math.max(ux * ux, vx * vx) + Math.max(uy * uy, vy * vy)
< 16 * tolerance * tolerance;
< 10 * tolerance * tolerance;
},
getBounds: function(v) {