Use day of month instead of day of week when seeding shuffle.
This commit is contained in:
parent
f683acf0ae
commit
24240c5f68
@ -45,7 +45,7 @@ const roundup = (v: number, mod: number) => {
|
||||
* @param {Array} a items An array containing the items.
|
||||
*/
|
||||
function shuffle(a: Array<MediaItem>) {
|
||||
let rng = new Random(new Date().getDay());
|
||||
let rng = new Random(new Date().getDate());
|
||||
for (let i = a.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(rng.nextFloat() * (i + 1));
|
||||
[a[i], a[j]] = [a[j], a[i]];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user