source-rng

1.0.1 • Public • Published

Uniform RNG based on Valve's Source Engine SDK

JavaScript version of @Step7750's UniformRandom module. All credit goes to @Step7750 and his original module.

Installation

npm install source-rng --save

Using

const SourceRNG = require('source-rng');
const rng = new SourceRNG();

rng.setSeed(72);

rng.randomFloat(0, 1);    // 0.5430998
rng.randomFloat(0, 1);    // 0.40631828
rng.randomFloat(0, 100);  // 62.147213
rng.randomFloat(0, 1);    // 0.058990162

Readme

Keywords

none

Package Sidebar

Install

npm i source-rng

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

9.68 kB

Total Files

7

Last publish

Collaborators

  • andreaswj