uniformR package:mwc-probability
The uniform distribution over the provided interval.
>>> sample (uniformR (0, 1)) gen
0.44984153252922365
Generates a value uniformly distributed over the provided range, which
is interpreted as inclusive in the lower and upper bound.
- uniformRM (1 :: Int, 4 :: Int) generates values uniformly
from the set <math>
- uniformRM (1 :: Float, 4 :: Float) generates values
uniformly from the set <math>
The following law should hold to make the function always defined:
uniformRM (a, b) = uniformRM (b, a)
The class of types for which a uniformly distributed value can be
drawn from a range.