prdrng
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Pseudo random distribution event calculator

Install

First run

npm install prdrng --save

Usage

import PrdRng from 'prdrng';

let event = new PrdRng(25);
// Run event as many times as necessary.
// These probabilities average out so that, 
// over a moderate period of time, the success rate will be 25%.
for (let i = 0; i < 1000; i++)
  let success = event.run();

More info on pseudo-random distibution

DOTA 2 wiki

Package Sidebar

Install

npm i prdrng

Weekly Downloads

6

Version

1.0.4

License

BSD-2-Clause

Unpacked Size

15.1 kB

Total Files

7

Last publish

Collaborators

  • mpursa