RandomEffectController.uniform constructor
RandomEffectController.uniform(
- DurationEffectController child, {
- required double min,
- required double max,
- Random? random,
Factory constructor that uses a random variable uniformly distributed on
[min, max)
.
Implementation
factory RandomEffectController.uniform(
DurationEffectController child, {
required double min,
required double max,
Random? random,
}) {
assert(min >= 0, 'Min value cannot be negative: $min');
assert(min < max, 'Max value must exceed min: max=$max, min=$min');
return RandomEffectController(
child,
_UniformRandomVariable(min, max, random),
);
}