Posted July 26, 2012
I'm working on creating procedurally generated heightmaps, and am using the Linear Congruential Generator formula to generate psuedorandom numbers. The problem is, I can't figure out how you limit the output to a certain range (i.e, only numbers from 1 to 30, or something like that). Does anyone know how I'd do this?
LINK:
http://www1.i2r.a-star.edu.sg/~knandakumar/nrg/Tms/Probability/Probgenerator.htm
(explains how the formula works, and tells how to limit the ranges... but in a way I don't understand :P. Math isn't my forte, you see).
LINK:
http://www1.i2r.a-star.edu.sg/~knandakumar/nrg/Tms/Probability/Probgenerator.htm
(explains how the formula works, and tells how to limit the ranges... but in a way I don't understand :P. Math isn't my forte, you see).
No posts in this topic were marked as the solution yet. If you can help, add your reply