msvcrt-rand

1.0.0 • Public • Published

msvcrt-rand

the pseudorandom number generator used in Microsoft C Runtime's rand() function

npm travis standard

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

Apache-2.0

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i msvcrt-rand

    Weekly Downloads

    1

    Version

    1.0.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • goto-bus-stop