If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
script.zs
// Random.nextInt() as int;
myRandom.nextInt();
Return Type:
int
nextInt(bound as int) as int
Returns the next pseudorandom, uniformly distributed int value between zero (inclusive) and bound (exclusive) from this random number generator's sequence
script.zs
// Random.nextInt(bound as int) as int;
myRandom.nextInt(myInt);
Parameters:
bound: intType: int
- the upper bound (exclusive). Must be positive.