Default
Samples
import samples.*
import kotlin.math.sin
import kotlin.random.Random
import kotlin.test.assertTrue
fun main() {
//sampleStart
val randomValues = List(10) { Random.nextInt(0, 100) }
// prints new sequence every time
println(randomValues)
val nextValues = List(10) { Random.nextInt(0, 100) }
println(nextValues)
assertTrue(randomValues != nextValues)
//sampleEnd
}
Functions
next Boolean
Link copied to clipboard
Gets the next random Boolean value.
next Double
Link copied to clipboard