MCPcopy
hub / github.com/jipegit/OSXAuditor / interpolate

Function interpolate

d3-3.2.8/d3.js:2950–2959  ·  view source on GitHub ↗
(from, to, direction, listener)

Source from the content-addressed store, hash-verified

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 }

Callers 9

d3_geo_clipPolygonFunction · 0.70
d3_geo_clipFunction · 0.70
d3_geo_clipViewFunction · 0.70
circleFunction · 0.70
segmentFunction · 0.70
d3_scale_bilinearFunction · 0.70
d3_scale_polylinearFunction · 0.70
attrTweenFunction · 0.70
attrTweenNSFunction · 0.70

Calls 2

cornerFunction · 0.85
comparePointsFunction · 0.85

Tested by

no test coverage detected