BiasedNumbers
object BiasedNumbers
Utility classes for selecting numbers at random, but not necessarily in an uniform way. The implementation will try to pick "evil" numbers more often than uniform selection would. This includes exact range boundaries, numbers very close to range boundaries, numbers very close (or equal) to zero, etc.
The exact method of selection is implementation-dependent and may change (if we find even more evil ways).
Functions
Link copied to clipboard
A random double between min (inclusive) and max (inclusive). If you wish to have an exclusive range, use Math.nextAfter to adjust the range.
Link copied to clipboard
A random float between min (inclusive) and max (inclusive). If you wish to have an exclusive range, use Math.nextAfter to adjust the range.