Returns a random floating point number between the given minimum (inclusive) and maximum (inclusive) values. Uses Math.random() internally to generate the random number and can be rounded to a specified number of decimal places.
randomFloat(0, 10); // 5.23randomFloat(0, 10, 4); // 5.2345 Copy
randomFloat(0, 10); // 5.23randomFloat(0, 10, 4); // 5.2345
min value
max value
the random float value
Returns a random floating point number between the given minimum (inclusive) and maximum (inclusive) values.
Uses Math.random() internally to generate the random number and can be rounded to a specified number of decimal places.
Example