@rojo2/linear-congruential-generator

1.0.2 • Public • Published

Linear Congruential Generator

Travis CI

import linearCongruentialGenerator, { MODULUS } from "@rojo2/linear-congruential-generator";

function createRandomFunction(initialValue = 0) {
  let value = initialValue;
  return function() {
    value = linearCongruentialGenerator(value);
    return value / MODULUS;
  }
}

Made with ❤️ by ROJO 2 (http://rojo2.com)

Package Sidebar

Install

npm i @rojo2/linear-congruential-generator

Weekly Downloads

12

Version

1.0.2

License

MIT

Unpacked Size

6.75 kB

Total Files

5

Last publish

Collaborators

  • aitormm
  • azazeln28