randomPercent function

double randomPercent([
  1. int min = 0,
  2. int max = 100
])

Generates a random double between the specified min and max percent values.

Implementation

double randomPercent([int min = 0, int max = 100]) => randomInt(min.clamp(0, 100), max.clamp(0, 100)) / 100;