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

Function packEncloseRandom

external/.d3.js:13298–13308  ·  view source on GitHub ↗
(circles, random)

Source from the content-addressed store, hash-verified

13296}
13297
13298function packEncloseRandom(circles, random) {
13299 var i = 0, n = (circles = shuffle(Array.from(circles), random)).length, B = [], p, e;
13300
13301 while (i < n) {
13302 p = circles[i];
13303 if (e && enclosesWeak(e, p)) ++i;
13304 else e = encloseBasis(B = extendBasis(B, p)), i = 0;
13305 }
13306
13307 return e;
13308}
13309
13310function extendBasis(B, p) {
13311 var i, j;

Callers 2

encloseFunction · 0.85
packSiblingsRandomFunction · 0.85

Calls 5

shuffleFunction · 0.85
enclosesWeakFunction · 0.85
encloseBasisFunction · 0.85
extendBasisFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected