Skip to main content

Left By Degs

Turns left by a specified number of degrees.

Left By Degs block

Description

The Left By Degs block orientates the agent in Spaceland to the left of its original heading by the inputted number of degrees during each StarLogo clock tick. This is a code block part of the Movement drawer.

Usage

The Left By Degs block orientates the agent in Spaceland to the left of its original heading by the inputted number of degrees during each StarLogo clock tick.

Syntax

Inputs in this block:

  • A number (degrees to turn left)

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.

Left By Degs example code

Notes

The Left By Degs block rotates agents counterclockwise when given positive values. Negative values will cause the agent to turn right instead.