msvcrt-rand
MSVCRT's rand() function in javascript
Last updated 3 years ago by goto-bus-stop .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install msvcrt-rand 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

1 Versions

  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |