(a, b)
| 3019 | return comparePoints(a.point, b.point); |
| 3020 | } |
| 3021 | function comparePoints(a, b) { |
| 3022 | var ca = corner(a, 1), cb = corner(b, 1); |
| 3023 | 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]; |
| 3024 | } |
| 3025 | function clipLine(a, b) { |
| 3026 | var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ]; |
| 3027 | if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1; |
no test coverage detected