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

Function corner

explainshell/web/static/js/d3.v3.js:2759–2761  ·  view source on GitHub ↗
(p, direction)

Source from the content-addressed store, hash-verified

2757 return clip;
2758 };
2759 function corner(p, direction) {
2760 return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;
2761 }
2762 function compare(a, b) {
2763 return comparePoints(a.point, b.point);
2764 }

Callers 3

insideFunction · 0.85
interpolateFunction · 0.85
comparePointsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected