I know how this works in principle:
(Math.random() * ((upperbound - lowerbound) + 1) + lowerbound);
But if I use this for negative numbers for example: I want to generate random numbers ranging from -30 to -35, I use the same formula:
(Math.random()*(-30-(-35)+1)+(-35));
But the generated numbers contain -29 too. Is there a way to avoid this ? I found the upper solution in one of the older answered questions, I would like to know why it does not work in this case.