shuffleFix
This commit is contained in:
parent
1d0e2bd0c7
commit
d5a9019220
1 changed files with 3 additions and 1 deletions
|
|
@ -389,7 +389,9 @@ export const randL = (n) => {
|
|||
export const randrun = (n) => {
|
||||
return signal((t, controls) => {
|
||||
// Without adding 0.5, the first cycle is always 0,1,2,3,...
|
||||
const rands = getRandsAtTime(t.floor().add(0.5), n, controls.randSeed);
|
||||
let rands = getRandsAtTime(t.floor().add(0.5), n, controls.randSeed);
|
||||
// Support n = 1
|
||||
if (!Array.isArray(rands)) rands = [rands];
|
||||
const nums = rands
|
||||
.map((n, i) => [n, i])
|
||||
.sort((a, b) => (a[0] > b[0]) - (a[0] < b[0]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue