Left By Degs: Difference between revisions
(Created page with "Category:Movement <section begin="image"/>alt=The left by degs block|thumb<section end="image"/> <section begin="name" />'''{{Block|left by [_] degs}}'''<section end="name" /> is a code block part of the Movement drawer. ==Usage== {{Block|left by [_] degs}} orientates the agent in Spaceland to the left of its original heading by the inputted number of degrees during each Starlogo clock tick. ===Syntax=== <co...") |
(duplicate file already uploaded) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | |||
<translate> | |||
<!--T:1--> | |||
[[Category:Movement]] | [[Category:Movement]] | ||
<section begin="image"/>[[File:Left By Degs.png|alt=The left by degs block|thumb]]<section end="image"/> | <section begin="image"/>[[File:Left By Degs.png|alt=The left by degs block|thumb]]<section end="image"/><p id="tooltip">Turns left by a specified number of degrees.</p> | ||
<!--T:6--> | |||
<section begin="name" />'''{{Block|left by [_] degs}}'''<section end="name" /> is a [[code block]] part of the [[Movement]] drawer. | <section begin="name" />'''{{Block|left by [_] degs}}'''<section end="name" /> is a [[code block]] part of the [[Movement]] drawer. | ||
<!--T:2--> | |||
==Usage== | ==Usage== | ||
{{Block|left by [_] degs}} orientates the [[agents|agent]] in [[Spaceland]] to the left of its original [[heading]] by the inputted number of degrees during each Starlogo clock [[tick]]. | {{Block|left by [_] degs}} orientates the [[agents|agent]] in [[Spaceland]] to the left of its original [[heading]] by the inputted number of degrees during each Starlogo clock [[tick]]. | ||
<!--T:3--> | |||
==Syntax== | |||
<code>left by [number] degs</code> | <code>left by [number] degs</code> | ||
== | <!--T:7--> | ||
Inputs in this block: | |||
#a number | |||
==Example== <!--T:8--> | |||
<!--T:9--> | |||
[[File:while_toggled_example.gif|alt=Left By Degrees example gif|thumb]] | |||
[[File:while_toggled_example.png|alt=Left By Degrees example code|thumb]] | |||
<!--T:10--> | |||
When the ‘forever’ button is toggled, the ‘Turtle’ agents move [[Special:MyLanguage/Forward|forward]] and turns left by a random number between -30 and 30, allowing them to wander [[Special:MyLanguage/Forward|forward]] in a random direction. | |||
==Nuances== <!--T:4--> | |||
<!--T:5--> | |||
==Related Blocks== | ==Related Blocks== | ||
*{{Block|Forward|forward [_]}} | *{{Block|Forward|forward [_]}} | ||
Line 18: | Line 39: | ||
*{{Block|up|up [_]}} | *{{Block|up|up [_]}} | ||
*{{Block|down|up [_]}} | *{{Block|down|up [_]}} | ||
*{{Block|Teleport To | *{{Block|Teleport To|teleport to x: [_] y: [_] z: [_]}} | ||
</translate> |
Latest revision as of 18:27, 16 August 2023
Turns left by a specified number of degrees.
left by [_] degs
is a code block part of the Movement drawer.
Usage
left by [_] degs
orientates the agent in Spaceland to the left of its original heading by the inputted number of degrees during each Starlogo clock tick.
Syntax
left by [number] degs
Inputs in this block:
- a number
Example
When the ‘forever’ button is toggled, the ‘Turtle’ agents move forward and turns left by a random number between -30 and 30, allowing them to wander forward in a random direction.