Randoms extension

Provides functions for using Randoms.

on

Methods

doubles({int? length, double min = 0.0, double max = 1.0}) Stream<double>
Returns a Stream of length that produces random doubles in the range, [min] <= value < [max].
ints({int? length, int min = 0, required int max}) Stream<int>
Returns a Stream of length that produces random integers in the range, [min] <= value < [max].
nextBoundedDouble(double min, double max) double
Generates a random double in the range, [min] <= value < [max].
nextBoundedInt(int min, int max) int
Generates a random integer uniformly distributed in the range, [min] <= value < [max].
nextWeightedBool(double probability) bool
Returns a weighted boolean value based on probability.