Random To: Difference between revisions
(→Usage) |
No edit summary |
||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
[[Category:Math]] | [[Category:Math]] | ||
<section begin="image"/>[[File:Random To.png|alt=The random to block|thumb]]<section end="image"/> | <section begin="image"/>[[File:Random To.png|alt=The random to block|thumb]]<section end="image"/> | ||
Line 15: | Line 18: | ||
*{{Block|Right By Degs|right by [_] degs}} | *{{Block|Right By Degs|right by [_] degs}} | ||
*{{Block|Random Decimal|random decimal}} | *{{Block|Random Decimal|random decimal}} | ||
</translate> |
Revision as of 14:18, 16 March 2023
random [_] to [_]
is a code block part of the Math drawer.
Usage
random [_] to [_]
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
random [number] to [number]
Common Uses
- The
random [_] to [_]
block is most commonly used for random movement. When inserted into a Movements block such as theleft by [_] degs
combined with theforward[_]
block, an agent will wander throughout Spaceland in a random direction.