@rutan/mini-random
v0.2.2
Published
A tiny random number generator
Downloads
3
Readme
MiniRandom
install
npm install @rutan/mini-random
Usage
import { MiniRandom, create } from '@rutan/mini-random';
const random1 = create();
random1.rand(); // => 0.8618663500207165
random1.randInt(100); // => 10
const random2 = new MiniRandom(...random1.dumpSeed());
console.log(random1.rand() === random2.rand()); // => true