RandomInRange extension
Extension on Random providing the methods
nextInRange
and nextIntFromList
.
- on
Methods
-
gridPoints(
num start, num end, int levels) → List< num> -
Returns the equidistant grid points of a discrete interval.
The first point coincides with
start
, the last one withend
. -
nextFromList<
T> (List< T> list) → T - Generates an integer randomly picked from a list of integers. The list must not be empty.
-
nextInRange(
num start, num end, {InverseCdf? inverseCdf}) → num -
Generates a random floating point
value in the range from
start
, inclusive, toend
, exclusive. -
nextLevelInRange(
num start, num end, int levels, {InverseCdf? inverseCdf}) → num -
Generates a random floating point
value in the range from
start
, inclusive, toend
, exclusive.