DEV Community

Discussion on: 3 Amazing ways to generate random numbers without Math.random()

Collapse
 
shalvah profile image
Shalvah • Edited

Great article! I love how you explained the algorithms simply. Two things:

  • the title kinda makes it sound like you're suggesting alternatives to Math.random() (which is why you have so many comments saying people should use the library😆), rather than just exploring how PRNGs are implemented
  • could you explain how these algorithms get their starting seed? If you used the same seed (and modulus, multiplier, increment) always, it's no longer pseudo-random. Do they store the last used seed somewhere? Use the clock (which makes it sort of predictable)?