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

Function left

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

Source from the content-addressed store, hash-verified

38 }
39
40 function left(a, x, lo = 0, hi = a.length) {
41 if (lo < hi) {
42 if (compare1(x, x) !== 0) return hi;
43 do {
44 const mid = (lo + hi) >>> 1;
45 if (compare2(a[mid], x) < 0) lo = mid + 1;
46 else hi = mid;
47 } while (lo < hi);
48 }
49 return lo;
50 }
51
52 function right(a, x, lo = 0, hi = a.length) {
53 if (lo < hi) {

Callers 1

centerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected