MCPcopy Create free account
hub / github.com/idank/explainshell / interpolate

Function interpolate

explainshell/web/static/js/d3.v3.js:2694–2703  ·  view source on GitHub ↗
(from, to, direction, listener)

Source from the content-addressed store, hash-verified

2692 return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);
2693 }
2694 function interpolate(from, to, direction, listener) {
2695 var a = 0, a1 = 0;
2696 if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {
2697 do {
2698 listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
2699 } while ((a = (a + direction + 4) % 4) !== a1);
2700 } else {
2701 listener.point(to[0], to[1]);
2702 }
2703 }
2704 function visible(x, y) {
2705 return x0 <= x && x <= x1 && y0 <= y && y <= y1;
2706 }

Callers 10

d3_geo_clipPolygonFunction · 0.85
d3_geo_clipFunction · 0.85
d3_geo_clipViewFunction · 0.85
circleFunction · 0.85
segmentFunction · 0.85
d3_scale_bilinearFunction · 0.85
d3_scale_polylinearFunction · 0.85
attrStringFunction · 0.85
attrStringNSFunction · 0.85
styleStringFunction · 0.85

Calls 2

cornerFunction · 0.85
comparePointsFunction · 0.85

Tested by

no test coverage detected