2.0.0 • Published 5 years ago
@aureooms/js-pseudo-random v2.0.0
:game_die: @aureooms/js-pseudo-random
Pseudorandom number generators for JavaScript. See docs.
:warning: The code requires
regeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime.import { splitmix64, nextFloat64, nextUint64, } from '@aureooms/js-pseudo-random';
const seed = 0, 0; // Two 32-bit signed integers. const prng = splitmix64(seed); nextUint64(prng); // 64 random bits as two 32-bit signed integers (compatible with @aureooms/js-uint64). nextFloat64(prng); // A random double in the range [0, 1[.
[](https://raw.githubusercontent.com/aureooms/js-pseudo-random/main/LICENSE)
[](https://www.npmjs.org/package/@aureooms/js-pseudo-random)
[](https://travis-ci.org/aureooms/js-pseudo-random/branches)
[](https://david-dm.org/aureooms/js-pseudo-random)
[](https://david-dm.org/aureooms/js-pseudo-random?type=dev)
[](https://github.com/aureooms/js-pseudo-random/issues)
[](https://www.npmjs.org/package/@aureooms/js-pseudo-random)
[](https://codeclimate.com/github/aureooms/js-pseudo-random/issues)
[](https://codeclimate.com/github/aureooms/js-pseudo-random/trends/churn)
[](https://codecov.io/gh/aureooms/js-pseudo-random)
[](https://codeclimate.com/github/aureooms/js-pseudo-random/trends/technical_debt)
[](https://aureooms.github.io/js-pseudo-random/source.html)
[](https://bundlephobia.com/result?p=@aureooms/js-pseudo-random)
## :scroll: References
- [The PRNG shootout](http://prng.di.unimi.it)
- [Testing common random-number generators](https://github.com/lemire/testingRNG)