Skip to content

format

typescript
Random.NextFloatRanged(min, max)

class: Random

description

Returns a random floating-point number within the range of min and max (excluding min and max).

parameter

param_nametypedescription
minnumberThe minimum value.
maxnumberThe maximum value.

reture

typedescription
numberA random floating-point number.

code example

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