Last 12 weeks · 0 commits
4 of 6 standards met
I noticed that in file "index.js" line 14, you add the seed by (MAX_INT32 - 1) which is 2147483646 when seed <= 0, but the implementation on wikipedia and the book around my hand "Data structures and algorithm analysis in c++" all add the seed by 2147483647 when seed < 0. And I also noticed that in file "index.js" line 25 you use Math.round to get integer from the float value. but if you implemented it in this way, your "integerInRange" will not get a uniform distribution in [min, max], min and max value is roughly half the possibility of other numbers.
Repository: sindresorhus/park-miller. Description: Park-Miller pseudorandom number generator (PRNG) Stars: 55, Forks: 4. Primary language: JavaScript. Languages: JavaScript (90.3%), TypeScript (9.7%). License: MIT. Topics: nodejs, npm-package, park-miller, prng, pseudorandom, pseudorandom-number-generator, random. Latest release: v2.0.1 (5mo ago). Open PRs: 0, open issues: 0. Last activity: 5mo ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, Richienb.