4 ms·
For people concerned with cross-browser reproducibility as well as resuming a PRNG between sessions (e.g., to reproduce random sequences in replays or multiplay
by blixt 11y ago
For people concerned with cross-browser reproducibility as well as resuming a PRNG between sessions (e.g., to reproduce random sequences in replays or multiplayer), check out arbit, an NPM package I made. It performs close to Math.random and uses floats for state internally for max resolution (i.e., length and number of unique sequences):
https://github.com/blixt/js-arbit https://github.com/blixt/js-arbit
I would also recommend running the provided DieHarder test, which is crafted to measure the quality of PRNGs.