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

Function shuffler

external/.d3.js:1192–1202  ·  view source on GitHub ↗
(random)

Source from the content-addressed store, hash-verified

1190var shuffle$1 = shuffler(Math.random);
1191
1192function shuffler(random) {
1193 return function shuffle(array, i0 = 0, i1 = array.length) {
1194 let m = i1 - (i0 = +i0);
1195 while (m) {
1196 const i = random() * m-- | 0, t = array[m + i0];
1197 array[m + i0] = array[i + i0];
1198 array[i + i0] = t;
1199 }
1200 return array;
1201 };
1202}
1203
1204function sum$2(values, valueof) {
1205 let sum = 0;

Callers 1

.d3.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected