Currently making a program for homework and I am confused regarding one aspect of the normal formula that is usually used
Math.random() * (max - min) + min
I understand that this would work perfectly fine with a range of 1 - 1000 for example.
Now, sorry for my ignorance and if this comes out as a stupid question... but if I want a range from 0 - 1000, would this still work?
Since the range 1 - 1000 would set (max - min) as 999, then multiply by Math.random() and then add min... range 0 - 1000 would set (max - min) as 1000 and would not add anything at the end since its still 0. Would this still work if I have min as 0 and max as 1000? Or would I have to go through a different route/formula?