Abs
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.