Random To
A random number between and including the limits.

Description
The Random To block defines the upper and lower bounds of a range from which a random number is generated. The number is generated between and including the set limits. This is a code block part of the Math drawer.
Usage
The Random To block defines the upper and lower bounds of a range from which a random number is generated. The number is generated between and including the set limits.
Syntax
Inputs in this block:
- First input: defines the lower limit
- Second input: defines the upper limit for the range of the generated random number

Example
One of the most common uses of the Random To block is for random movement. As shown above, creating a random turn, and combining that with a forward block, allows an agent to wander throughout spaceland in a random direction.

Notes
The Random To block is most commonly used for random movement. When inserted into a Movements block such as the left by degs combined with the forward block, an agent will wander throughout Spaceland in a random direction.
Related Blocks
- left by [_] degs - Rotate agent left
- right by [_] degs - Rotate agent right
- random decimal - Generate random decimal between 0 and 1