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

Function comparePoints

explainshell/web/static/js/d3.v3.js:2765–2768  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

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;

Callers 2

interpolateFunction · 0.85
compareFunction · 0.85

Calls 1

cornerFunction · 0.85

Tested by

no test coverage detected