random

fun random(range: Int): Int
fun random(range: Long): Long

Returns a random number between 0 (inclusive) and the specified value (inclusive).


fun random(start: Int, end: Int): Int
fun random(start: Long, end: Long): Long

Returns a random number between start (inclusive) and end (inclusive).


fun random(): Float

Returns random number between 0.0 (inclusive) and 1.0 (exclusive).


fun random(range: Float): Float

Returns a random number between 0 (inclusive) and the specified value (exclusive).


fun random(start: Float, end: Float): Float

Returns a random number between start (inclusive) and end (exclusive).