11-11-2018, 07:04 PM
With that approach, the random library sees millions of steps between your limits as it generates values to a very high resolution. I.e. it might generate 0.00000001, 0.0000002, 0.0000003 etc, all of which .toFixed will evaluate to 0, which means lots of passes will be run with exactly the same settings. Generating an integer and dividing has the effect of defining the resolution.