randomDouble function
Generates a random double between the specified min
and max
values.
Implementation
double randomDouble([double min = 0, double max = 999999]) {
var n = min.compareAndSwap(max);
min = n.first;
max = n.last;
return min + _random.nextDouble() * (max - min);
}