From 24240c5f6880d331e74d11c6e060ffd9ae585363 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 14 Mar 2020 16:30:44 -0700 Subject: [PATCH] Use day of month instead of day of week when seeding shuffle. --- react-slideshow/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-slideshow/src/App.tsx b/react-slideshow/src/App.tsx index 831bbb9..8a7db1c 100644 --- a/react-slideshow/src/App.tsx +++ b/react-slideshow/src/App.tsx @@ -45,7 +45,7 @@ const roundup = (v: number, mod: number) => { * @param {Array} a items An array containing the items. */ function shuffle(a: Array) { - 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]];