Hi guys,
Setting and expecting limits unfortunately C disappears once in a while.
My pen:
How should I interpret the limit scale:randomNumber(0.5, 1) ?
Kind regards
Manfred
See the Pen QKwrGG by mikeK (@mikeK) on CodePen
Here's a random function for decimal values...
function random(min, max) {
if (max == null) { max = min; min = 0; }
if (min > max) { var tmp = min; min = max; max = tmp; }
return min + (max - min) * Math.random();
}
Just pass in your min and max, and it will return a floating-point value. If you pass in a single value, 0 will be the default min.
// This is the same...
random(10);
// ... as this
random(0, 10);
But we can improve upon that. What about probabil