(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]; |
| 2768 | } |
| 2769 | function clipLine(a, b) { |
| 2770 | var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ]; |
| 2771 | if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1; |
no test coverage detected