Skip to content

format

typescript
Random.NextFloatRanged(min, max)

class: Random

description

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

parameter

param_nametypedescription
minnumberThe minimum value.
maxnumberThe maximum value.

return

typedescription
numberA random float number.

code example

typescript
let num = Random.NextFloatRanged(1,10);
Debug.Log(num);