@creatartis/randomness.js
Pseudo-random number generation functions and utilities for everything that
Javascript's own Math.random()
falls short of covering, which is a lot.
It includes:
-
The class
Randomness
with useful methods likerandomInt
,choice
,shuffle
, etc. -
Pseudo-random number generators based on the simple linear congruential algorithm algorithm, and the more complex Mersenne twister algorithm. Both generators can be seeded properly.
License
Open source under an MIT license (see LICENSE.md).