In JavaScript, is it possible to generate a random number from another number?
I'm trying to implement a predictable random number generator for one of my fractal terrain generators. I already know that it's possible to generate a random number using Math.random(), but I want to create a random number generator that produces exactly one output for every input. (For example, predictableRandomGenerator(1)
would always produce the same result, which would not necessarily be the same as the input.)
So is it possible to generate a random number from another number, where the output is always the same for each input?