randgen#
Constructors#
Functions#
Constructor descriptions#
Function descriptions#
Returns a random number -214748 to 214748
, inclusive.
int Rand(int bound) ๐ Source
Returns a random number 0 to bound
, inclusive.
int Rand(int bound1, int bound2) ๐ Source
Returns a random number bound1 to bound2
, inclusive.
Returns a random long number -2147483648L to 2147483647L
, inclusive.
long LRand(long bound) ๐ Source
Returns a random long number 0L to bound
, inclusive.
long LRand(long bound1, long bound2) ๐ Source
Returns a random long number bound1 to bound2
, inclusive.
void SRand(long seed) ๐ Source
Seeds the RNG with the given seed.
Seeds the RNG with a randomly-determined seed, based off of the system clock and the previous RNG.
De-allocates this randgen
pointer, so that itsโ pointer ID may be
re-used. You may only have a limited number of randgen pointers active at
a time; freeing them when you are done with them helps not reach the
limit.
Warning
Deprecated! Free() no longer does anything as of ZC 3.0. Objects are now freed automatically.
Grants โOwnershipโ of the randgen pointer to the script that calls this function. When the script with โOwnershipโ terminates (at the same time itsโ local arrays are deallocated), this randgen pointer will automatically be โFree()โd.