Random
Info
Dependencies:
- None
Implementation:
Random.d on GitHub
Provides more random randomization than Hlp_Random()
function.
Initialization
Initialize with LeGo_Random
flag.
Functions
r_Next
r_Next
Returns a random number.
The function returns a random number.
r_Max
r_Max
Returns a random number from 0 to max
.
var int max
Maximum value of number
Return value
The function returns a random number from 0 to 'max'.
r_MinMax
r_MinMax
Returns a random number from 'min' to 'max'.
var int max
Maximum value of numbervar int min
Minimum value of number
Return value
The function returns a random number from min
to max
.
r_Init
r_Init
Initializes the random number generator. Happens optionally in LeGo_Init
.
var int seed
The initializing value
r_DefaultInit
r_DefaultInit
Initializes the random number generator based on the current time.