MCPcopy Create free account
hub / github.com/breck7/scroll / center

Function center

external/.d3.js:64–67  ·  view source on GitHub ↗
(a, x, lo = 0, hi = a.length)

Source from the content-addressed store, hash-verified

62 }
63
64 function center(a, x, lo = 0, hi = a.length) {
65 const i = left(a, x, lo, hi - 1);
66 return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
67 }
68
69 return {left, center, right};
70}

Callers 2

mercatorProjectionFunction · 0.85
transverseMercatorFunction · 0.85

Calls 1

leftFunction · 0.85

Tested by

no test coverage detected