Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    msvcrt-randpublic

    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

    install

    npm i msvcrt-rand

    Downloadsweekly downloads

    2

    version

    1.0.0

    license

    Apache-2.0

    repository

    githubgithub

    last publish

    collaborators

    • avatar