Random To/es: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 33: | Line 33: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
[[File: | [[File:while_toggled_example.gif|alt=Random To example gif|thumb]] | ||
[[File: | [[File:while_toggled_example.png|alt=Random To example code|thumb]] | ||
</div> | </div> | ||
Latest revision as of 18:20, 16 August 2023
random [_] to [_]
es un bloque de código parte de Matemáticas cajón.
Uso
Aleatorio [_] a [_]
define los límites superior e inferior de un rango a partir del cual se genera un número aleatorio. El número se genera entre e incluyendo los límites establecidos.
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.
Sintaxis
Usos comunes
- The
Aleatorio [_] a [_]
El bloque se usa más comúnmente para el movimiento aleatorio. Cuando se inserta en un Movements Bloque como elleft by [_] degs
combinado con elforward[_]
Bloquear, un agente vagará por todo Spaceland en una dirección aleatoria.
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.