nextDoubleBetween method
Returns a random double between min
(inclusive) and max
(exclusive),
using a linear probability distribution.
Implementation
double nextDoubleBetween(double min, double max) {
if (min >= max) {
throw ArgumentError.value(max, 'max', 'Must be greater than min');
}
return min + nextDouble() * (max - min);
}