best-random

v1.0.3
A replacement for Math.random() that is tiny, fast, seedable, and has good statistical properties.
random prng rng seedable seed

bench

npm run build && cd bench && ts-node index.ts

build

gulp

clean

git clean -Xfd -e tools/RNG_Test.exe

prepublishOnly

git reset --hard head && git clean -xfd && npm i && npm run build && npm t

test

cd test && jest

test:u32

npm run build && cd tools && ts-node binout.ts best-random uint32 0 | RNG_Test stdin32 -seed 0 -tf 2 -te 1 -multithreaded

test:u53

npm run build && cd tools && ts-node binout.ts best-random uint53 0 | RNG_Test stdin -seed 0 -tf 2 -te 1 -multithreaded

test:u53l

npm run build && cd tools && ts-node binout.ts best-random uint53lo 0 | RNG_Test stdin32 -seed 0 -tf 2 -te 1 -multithreaded
npm i best-random

Metadata

  • MIT
  • Whatever
  • Daniel Lehenbauer
  • released 5/21/2020

Downloads

Maintainers