RandomAction

MathActions. RandomAction

An action 'random' that generates a random number from within a range. Both minimum and maximum are inclusive

If no range is specified. 0 - Number.MAX_SAFE_INTEGER (2^53 -1) is used as range.

Constructor

new RandomAction()

Source:
Examples
//Shorthand, generates a random number between 0 and 10, saves the result in the variable named "random"
{
    "random": [0, 10]
}
//Generate a random integer between 0 and 10, and save the result in the variable "myResultVariableName"
{
    "random": {
        "range": [0, 10],
        "as": "myResultVariableName"
    }
}
//Generate a random float number between 0 and 10, and save the result in the variable "myResultVariableName"
{
    "random": {
        "range": [0, 10],
        "float": true,
        "as": "myResultVariableName"
    }
}