File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2575,12 +2575,14 @@ new function() { // PostScript-style drawing commands
2575
2575
}
2576
2576
}
2577
2577
if ( extent ) {
2578
- var epsilon = /*#=*/ Numerical . GEOMETRIC_EPSILON ,
2578
+ var epsilon = /*#=*/ Numerical . ANGULAR_EPSILON ,
2579
2579
ext = abs ( extent ) ,
2580
2580
// Calculate amount of segments required to approximate over
2581
2581
// `extend` degrees (extend / 90), but prevent ceil() from
2582
2582
// rounding up small imprecisions by subtracting epsilon.
2583
- count = ext >= 360 ? 4 : Math . ceil ( ( ext - epsilon ) / 90 ) ,
2583
+ count = ext >= 360
2584
+ ? 4
2585
+ : Math . ceil ( ( ext - epsilon ) / 90 ) ,
2584
2586
inc = extent / count ,
2585
2587
half = inc * Math . PI / 360 ,
2586
2588
z = 4 / 3 * Math . sin ( half ) / ( 1 + Math . cos ( half ) ) ,
Original file line number Diff line number Diff line change @@ -152,6 +152,11 @@ var Numerical = new function() {
152
152
* as examining cross products to check for collinearity.
153
153
*/
154
154
TRIGONOMETRIC_EPSILON : 1e-8 ,
155
+ /**
156
+ * The epsilon to be used when performing angular checks in degrees,
157
+ * e.g. in `arcTo()`.
158
+ */
159
+ ANGULAR_EPSILON : 1e-5 ,
155
160
/**
156
161
* Kappa is the value which which to scale the curve handles when
157
162
* drawing a circle with bezier curves.
You can’t perform that action at this time.
0 commit comments