Abs: Difference between revisions
(Marked this version for translation) |
(Marked this version for translation) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
<translate> | <translate> | ||
<!--T:3--> | |||
<section begin="image"/>[[File:abs.png|alt=The Absolute Value Block|thumb]]<section end="image"/> | |||
==Usage== <!--T:4--> | |||
<!--T:2--> | <!--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
Usage
Returns the absolute value of the input.
Syntax
Inputs in this block:
- a number
Example
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.