Provides a pseudo random number generator. Each time this function is called, another random number will be returned.
random(??minimum??, ??maximum??)
Argument Name | Data Type | Description |
---|---|---|
??minimum?? |
Integer Number or Real Number |
The smallest number of allowed value range (including this value). [required] |
??maximum?? |
Integer Number or Real Number |
The highest number of allowed value range (including this value). [required] |
Data Type | Description |
---|---|
Integer Number or Real Number |
Next random number within the requested value range. |
This functions accepts any standard unit and finalness for its two arguments. However the unit types of the two arguments must be identical. The return value's unit type is identical to the two passed arguments' one, and the return value's finalness is the case if at least one of the two arguments has finalness.
on init
message("random(-5,5) = " & random(-5,5))
message("random(-5,5) = " & random(-5,5))
message("random(-5,5) = " & random(-5,5))
message("random(-5,5) = " & random(-5,5))
end on