(a, b)
| 2760 | return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; |
| 2761 | } |
| 2762 | function compare(a, b) { |
| 2763 | return comparePoints(a.point, b.point); |
| 2764 | } |
| 2765 | function comparePoints(a, b) { |
| 2766 | var ca = corner(a, 1), cb = corner(b, 1); |
| 2767 | return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; |
no test coverage detected