type
Random
src
@Js
abstract class Random : Obj
Random provides different implementation of random number generators with more flexibility than the methods available in sys. Also see Int.random
, Float.random
, Range.random
, and List.random
.
methods
makeSecure |
Construct a cryptographically strong random number generator. |
---|---|
makeSeeded |
Construct a repeatable, seeded random number generator. |
next |
Generate 64-bit integer within the given range. |
nextBool |
Generate random boolean. |
nextBuf |
Generate a randomized number of bytes. |
nextFloat |
Generate 64-bit floating point number between 0.0f and 1.0f. |