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

Function shuffle

external/.d3.js:13279–13292  ·  view source on GitHub ↗
(array, random)

Source from the content-addressed store, hash-verified

13277}
13278
13279function shuffle(array, random) {
13280 let m = array.length,
13281 t,
13282 i;
13283
13284 while (m) {
13285 i = random() * m-- | 0;
13286 t = array[m];
13287 array[m] = array[i];
13288 array[i] = t;
13289 }
13290
13291 return array;
13292}
13293
13294function enclose(circles) {
13295 return packEncloseRandom(circles, lcg$1());

Callers 1

packEncloseRandomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected