This is the documentation for the development version.
There are no official binaries for it; build it from the source code in git.
Download links on these pages work only after the release.
For the current release, see version 7.0.
random()
random(minValue, maxValue): int
Generate pseudo random number in given range. Uses cryptographically secure pseudo random generator (CSPRNG)
minValue |
Integer |
Start of range. |
maxValue |
Integer |
End of range. |
Return
Random value in range minValue..maxValue.
println(random(0, 100)); // Will print random value in 0..100 range