random library

A library for utilities for probability.

Extensions

RandomListUtil on List<T>
Utility to return random items from a list

Functions

randomBool({bool secure = false}) bool
Returns a random bool.
randomChoice<T>(Iterable<T> options, [Iterable<double> weights = const []]) → T
Selects a random element from options with optional weights.
randomDouble({bool secure = false}) double
Returns a random double from 0-1.
randomInt(int max, {bool secure = false}) int
Returns a random int.