random
ABSTRACT
Calculates a random number in the half open interval [low, high)
REMARK
This function can only be used at the top level. That is, you cannot use it within a function (as that would destroy the purity of functions). If you really do need randomness in a function, you should take in a random seed as a paramete
REMARK
Monocurl ensures that random functions are predictable in the following sense. Any rerun of a scene will always produce the exact same output, even if it references random functions. This generally helps for debugging and scene creation. However, this may also be unexpected to some users of the random function so be weary.
PARAMETERS
low | the inclusive starting point of the half open interval |
high | the exclusive ending point of the half open interval |
RETURN
a random number in the half open interval [low, high)
DECLARATION
func random(low, high)