1.0.0 • Published 7 years ago
msvcrt-rand v1.0.0
msvcrt-rand
the pseudorandom number generator used in Microsoft C Runtime's rand() function
Install
npm install msvcrt-rand
Usage
var rand = require('msvcrt-rand')
rand()
rand()
Seed the generator:
rand.seed(Date.now())
Create a new generator, with its own seed and its own state:
var make = require('msvcrt-rand/make')
var rand1 = make(Date.now())
var rand2 = make(Date.now())
rand1()
rand2() // this doesn't interfere with `rand1` state.
rand1()
License
1.0.0
7 years ago