Greater Than Or Equal To/en: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
<section begin="image"/>[[File:greater_than_or_equal_to.png|alt=The Greater Than Or Equal To Block|thumb]]<section end="image"/>
==Usage==


<p id="tooltip">Determines if the first input is greater than or equal to the second input and returns true or false.</p>
<p id="tooltip">Determines if the first input is greater than or equal to the second input and returns true or false.</p>
==Syntax==
Inputs in this block:
#a number
#a number
==Example==
[[File:greater_than_or_equal_to_example.gif|alt=Greater Than Or Equal To example gif|thumb]]
[[File:greater_than_or_equal_to_example.png|alt=Greater Than Or Equal To example code|thumb]]
This is a model of a hungry frog attempting to catch two different types of fly. While ‘fly around’ is toggled, the frog moves toward the closest fly. The fly detects whether the frog is nearby and will move in the opposite direction. The >= block is used to determine the speed of each fly based on the size of each agent. In this case, large flies are fast, whereas small flies are slow. It can be seen from the line graph that the population of the larger, faster flies falls more slowly than the smaller, slower flies.
==Related Blocks==
*[[Special:MyLanguage/Less Than Or Equal To|<=]]


[[Category:Logic]]
[[Category:Logic]]
[[Category:Code Block]]
[[Category:Code Block]]

Revision as of 15:47, 14 August 2023

Other languages:
The Greater Than Or Equal To Block

Usage

Determines if the first input is greater than or equal to the second input and returns true or false.

Syntax

Inputs in this block:

  1. a number
  2. a number

Example

This is a model of a hungry frog attempting to catch two different types of fly. While ‘fly around’ is toggled, the frog moves toward the closest fly. The fly detects whether the frog is nearby and will move in the opposite direction. The >= block is used to determine the speed of each fly based on the size of each agent. In this case, large flies are fast, whereas small flies are slow. It can be seen from the line graph that the population of the larger, faster flies falls more slowly than the smaller, slower flies.

Related Blocks