I can get random numbers in a custom range, with:
Math.floor(Math.random() * ( maximo - minimo + 1 ) + minimo )
Example:
var max = 10,
min = 4,
random = Math.floor(Math.random() * (max - min + 1) + min);
console.log(random);
But how can I get numbers between a certain range, including decimals between them?
For example, I want to get the numbers 1 - 3 , and the first decimal included, the options would be:
[1, 1.1, 1.2, 1.3 .... 3] ,
How can I do it in JavaScript?