Abs: Difference between revisions

From StarLogo Nova Wiki
(add tooltip text)
(Marked this version for translation)
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
<translate>
<translate>


<!--T:3-->
<section begin="image"/>[[File:abs.png|alt=The Absolute Value Block|thumb]]<section end="image"/>
==Usage== <!--T:4-->
<!--T:2-->
<p id="tooltip">Returns the absolute value of the input.</p>
<p id="tooltip">Returns the absolute value of the input.</p>
==Syntax== <!--T:5-->
<!--T:6-->
Inputs in this block:
#a number
==Example== <!--T:7-->
<!--T:8-->
[[File:abs_example.gif|alt=Abs example gif|thumb]]
[[File:abs_example.png|alt=Abs example code|thumb]]
<!--T:9-->
This is a model of molecules moving inside of a container. To ensure that the molecules stay within the bounds set by the volume slider, their position is calculated and corrected using the ‘bounce’ function. The absolute value button is used to make sure the molecules do not go outside the volume on either the negative or the positive x.


<!--T:1-->
<!--T:1-->

Latest revision as of 16:57, 14 August 2023

Other languages:
The Absolute Value Block

Usage

Returns the absolute value of the input.

Syntax

Inputs in this block:

  1. a number

Example

Abs example gif
Abs example code

This is a model of molecules moving inside of a container. To ensure that the molecules stay within the bounds set by the volume slider, their position is calculated and corrected using the ‘bounce’ function. The absolute value button is used to make sure the molecules do not go outside the volume on either the negative or the positive x.