Random To: Difference between revisions
(Created page with "Category:Math <section begin="image"/>alt=The random to block|thumb<section end="image"/> <section begin="name" />'''{{Block|random [_] to [_]}}'''<section end="name" /> is a code block part of the Math drawer. ==Usage== {{Block|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=== <code>random [number] to [n...") |
(Changed nuances to common uses) |
||
Line 8: | Line 8: | ||
<code>random [number] to [number]</code> | <code>random [number] to [number]</code> | ||
== | == Common Uses == | ||
The {{Block|random [_] to [_]}} block is most commonly used for random movement. When inserted into a [[Movements]] block such as the {{#vardefineecho:cedol|<code>[[Left By Degs|left by [_] degs</code>]]}} combined with the {{#vardefineecho:cedol|<code>[[Forward|forward[_]</code>]]}} block, an agent will wander throughout [[Spaceland]] in a random direction. | *The {{Block|random [_] to [_]}} block is most commonly used for random movement. When inserted into a [[Movements]] block such as the {{#vardefineecho:cedol|<code>[[Left By Degs|left by [_] degs</code>]]}} combined with the {{#vardefineecho:cedol|<code>[[Forward|forward[_]</code>]]}} block, an agent will wander throughout [[Spaceland]] in a random direction. | ||
==Related Blocks== | ==Related Blocks== |
Revision as of 18:50, 10 August 2022
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.