Random

object Random

Random A thread safe secure random number generating utiity.

Functions

getDelay
Link copied to clipboard
fun getDelay(): Int

Returns a suggested human reaction delay.

hicks
Link copied to clipboard
fun hicks(a: Int): Int

Returns the hicks value.

nextBoolean
Link copied to clipboard
fun nextBoolean(): Boolean

Generates a random boolean.

nextDouble
Link copied to clipboard
fun nextDouble(): Double

Returns the next pseudo-random double.

fun nextDouble(min: Double, max: Double): Double

Returns the next pseudo-random double, distributed between min and max.

nextGaussian
Link copied to clipboard
fun nextGaussian(): Double

Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0.

fun nextGaussian(min: Int, max: Int, sd: Double): Int
fun nextGaussian(min: Int, max: Int, mean: Int, sd: Double): Int

Returns a pseudo-random gaussian distributed number between the given min and max with the provided standard deviation.

nextInt
Link copied to clipboard
fun nextInt(min: Int, max: Int): Int

Returns a pseudo-generated random number.