@rojo2/linear-congruential-generator
1.0.2 • Public • Published
Linear Congruential Generator
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)
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.2 | 2 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.2 | 2 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
npm i @rojo2/linear-congruential-generator
Weekly Downloads