Use Math.random() to generate the default seed

This commit is contained in:
bjoluc 2022-03-13 16:14:14 +01:00
parent 48b8365294
commit f26d2762d2

View File

@ -7,7 +7,7 @@ import seedrandom from "seedrandom/lib/alea";
* @param seed An optional seed. If none is given, a random seed will be generated.
* @returns The seed value.
*/
export function setSeed(seed: string = seedrandom().int32().toString()) {
export function setSeed(seed: string = Math.random().toString()) {
Math.random = seedrandom(seed);
return seed;
}