1
0
Fork 0
trans.fail_xenotopic.network/pde/jitakami/shuffle.pde

14 lines
231 B
Plaintext

// function to shuffle an array of integers
void shuffle(int[] a)
{
int temp, pick;
for(int i=0; i<a.length; i++)
{
temp = a[i];
pick = (int)random(a.length);
a[i] = a[pick];
a[pick] = temp;
}
}