comparePairsByFractions MethodStatic
Return a pair comparator useful for sorting an array of detail pairs by their fractions.
- Comparison assumes detailA curves are the same and detailB curves are the same.
- Comparison checks for equality of pair fractions, then of pair points, then sorts by detailA.fraction, then detailB.fraction.
comparePairsByFractions(fractionTol: number = Geometry.smallFraction, pointTol: number = Geometry.smallMetricDistance, xyOnly: boolean = false, equateClosedCurveFractions: boolean = false): OrderedComparator<CurveLocationDetailPair>
| Parameter | Type | Description |
|---|---|---|
| fractionTol | number | tolerance for comparing fractions. Default value smallFraction. |
| pointTol | number | tolerance for comparing points, used if fractions are distinct. Default value smallMetricDistance. |
| xyOnly | boolean | whether to perform point comparisons in xy only. Default is false (compare 3D points). |
| equateClosedCurveFractions | boolean | whether to equate fractions 0 and 1 for physically closed curves. Default is false. |
Returns - OrderedComparator<CurveLocationDetailPair>
Defined in
- curve/CurveLocationDetail.ts Line 566
Last Updated: 28 April, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.