@f/srand
v1.0.1
Published
Seeded random number generator
Downloads
8
Readme
srand
Seeded random number generator using a linear congruential generator. This is NOT cryptographically secure.
Installation
$ npm install @f/srand
Usage
var srand = require('@f/srand')
var rand = srand(4)
rand()
rand()
rand()
API
srand(seed)
seed
- RNG seed. May be integer or string.
Returns: A function that, when called, generates the next random number in the sequence.
License
MIT