I have an interval function that generates a new array every second with random numbers.
I need random numbers, but so that they are close in value. Something similar to a processor performance meter. That is, the numbers are constantly jumping, but they do not go far from each other.
Current result: the numbers are generated quite randomly.
Desired result: the numbers are generated within a close value
Something like this:
What is at the moment:
There is Perlin Noise (Simplex Noise 2D) returning numbers in the interval
[0; 1], or in the range
[-1; 1], depending on the implementation. If you find one that returns numbers in the
[-1; 1], then turn it into an interval
[0; 1](divide the resulting number by 2 and add 0.5) and multiply by a certain coefficient.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!