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
    • Haha
    • Like
    6