Randoms extension
Provides functions for using Randoms.
- on
Methods
-
doubles(
{int? length, double min = 0.0, double max = 1.0}) → Stream< double> -
Available on Random, provided by the Randoms extension
Returns a Stream oflength
that produces random doubles in the range,[min] <= value < [max]
. -
ints(
{int? length, int min = 0, required int max}) → Stream< int> -
Available on Random, provided by the Randoms extension
Returns a Stream oflength
that produces random integers in the range,[min] <= value < [max]
. -
nextBoundedDouble(
double min, double max) → double -
Available on Random, provided by the Randoms extension
Generates a random double in the range,[min] <= value < [max]
. -
nextBoundedInt(
int min, int max) → int -
Available on Random, provided by the Randoms extension
Generates a random integer uniformly distributed in the range,[min] <= value < [max]
. -
nextWeightedBool(
double probability) → bool -
Available on Random, provided by the Randoms extension
Returns a weighted boolean value based onprobability
.