Aleatorio a

From StarLogo Nova Wiki
Revision as of 16:55, 14 August 2023 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Other languages:
The random to block

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

The Random to Block


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 el left 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.

Bloques relacionados