randInt

open fun randInt(i: Int, j: Int): Int

Returns a (pseudo)random number from the discrete uniform distribution over the integers {i, i + 1, . . . , j }, using this stream. Calls randU01 once.

Return

The integer pseudo random number

Parameters

i

start of range

j

end of range


open fun randInt(range: IntRange): Int

A convenience function for allowing the range to be specified via a range

Parameters

range

the integer range to generate over