Signature
stock xs_irand_range(pmin, pmax){ xs_assert_dbg(pmax - pmin >= 0, "xs_irand_range: pmin > pmax"); new i = pmin + floatround(xs_frand() * float(pmax - pmin)); if(i > pmax) i = pmax; return i;}
Description
Retrieves a random integer between the specified values.
Notes
- @pmax has to be greater than @pmin!
Parameters
- pmin — The minimum value.
- pmax — The maximum value.
Returns
A random integer.