(from, to, direction, listener)
| 2948 | return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]); |
| 2949 | } |
| 2950 | function interpolate(from, to, direction, listener) { |
| 2951 | var a = 0, a1 = 0; |
| 2952 | if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) { |
| 2953 | do { |
| 2954 | listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); |
| 2955 | } while ((a = (a + direction + 4) % 4) !== a1); |
| 2956 | } else { |
| 2957 | listener.point(to[0], to[1]); |
| 2958 | } |
| 2959 | } |
| 2960 | function visible(x, y) { |
| 2961 | return x0 <= x && x <= x1 && y0 <= y && y <= y1; |
| 2962 | } |
no test coverage detected