1.0.2 • Published 6 years ago

@rojo2/linear-congruential-generator v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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 :heart: by ROJO 2 (http://rojo2.com)