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

Function comparePoints

d3-3.2.8/d3.js:3021–3024  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

3019 return comparePoints(a.point, b.point);
3020 }
3021 function comparePoints(a, b) {
3022 var ca = corner(a, 1), cb = corner(b, 1);
3023 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];
3024 }
3025 function clipLine(a, b) {
3026 var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ];
3027 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