jsentropy
This is a set of PRNG's (Pseudo Random Number Generator) for javascript, specifically for node.
Implimented PRNGs:
- Linear Congruential Generator
Installing
npm install jsentropy (I have not released this to the npm repor yet, It will be done soon).
Usage 1
require('jsentropy').install('lcg',{})
Math.srand(10)
Math.rand()
Math.random()
Usage 2
var jsentropy = require('jsentropy')
jsentropy.lcg.srand(10);
jsentropy.lcg.rand();
jsentropy.lcg.random();