Rand

(Engine-Level Function)

Description Returns a random number between 0 and 1.
Returns Numeric
Usage Script only.
Function Groups Generic Math
Related to: Scale
Format: Rand()
Parameters None
Comments This function is useful for simulations.

Example:

If TimeOut(1, 2);
[
   simulatedTemperature = Scale(Rand(), 0, 1, 50, 150);
]

Every 2 seconds, this sets simulatedTemperature to a random value between 50 and 150.