Closed CuAnnan closed 9 years ago
Have been behind on github issues. The answer you're looking for is in the README.md:
The "pass" option can be used to get both the prng and the seed. The following returns both an autoseeded prng and the seed as an object, without mutating Math.random:
var obj = Math.seedrandom(null, { pass: function(prng, seed) {
return { random: prng, seed: seed };
}});
I'm trying to keep some things seeded pseudorandom so as to make it easy to save them.
But I want to keep the Math.random as is.
Is it possible to have the best of both worlds and get the seed generated when using new Math.seedrandom approach?