How to generate random numbers that change by a limited value
I'm trying to write a script to generate random numbers that only vary by a maximum amount each change. For example, if the first number is 0.76 and I want each generated number to be no more than .05 from the last so that the next number is between 0.71 and 0.81, etc.
The code I have now is:
var holdTime = .5;
seedRandom(Math.floor(time/holdTime), timeless = true);
random(0,10).toFixed(2)
So I have the numbers changing every half second to a value between 0.00 and 10.00, but right now the value jumps too much between numbers. (It occurs to me that statistically, the number should continue to return to its original value if the upper and lower change values are equal)
