Skip to content

format

typescript
Random.NextIntRanged(min, max)

class: Random

description

Returns a random integer within the range of min and max (random number does not include min and max).

parameter

param_nametypedescription
minnumberThe minimum value.
maxnumberThe maximum value.

reture

typedescription
numberA random integer.

code example

typescript
let random = new Random();
let num = random.NextIntRange(1,10);
Debug.Log(num);