GitShow/sindresorhus/park-miller
sindresorhus

park-miller

Park-Miller pseudorandom number generator (PRNG)

by sindresorhus
nodejsnpm-packagepark-millerprngpseudorandompseudorandom-number-generatorrandom
Star on GitHubForknpm

JavaScript

55 stars4 forks3 contributorsQuiet · 9mo agoSince 2018v2.0.1MIT

Meet the team

See all 3 on GitHub →
sindresorhus
sindresorhus9 contributions
BendingBender
BendingBender1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript90.3%
TypeScript9.7%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
superhail
some problems regarding this implementationClosedIssue

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.

superhail · 9mo ago
Richienb
Move to GitHub ActionsMergedPR
Richienb · 5y ago
BendingBender
Add TypeScript definitionMergedPR
BendingBender · 7y ago
Structured data for AI agents

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 (9mo ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, Richienb.

·@ofershap

Replace github.com with gitshow.dev