Round operations block
This information concerns a series of blocks that can round decimal numbers. Every block has value and precision.
- Ceil (Always round up)
- Floor (Always round down)
- Round (Normal rounding)
Note: Using Lodash_ functions for all math operations.
Takes a decimal to be rounded. Triggers an output immediately.
Takes a number to determine how many decimals to keep after the rounding. Does not trigger an output, if the value isn't set yet.
If precision isn't set, the default is 0 decimals and the output is guaranteed to be a whole number.
A decimal number after the rounding operation.
graph LR A(['5.15546']) --Value--> I(Rund Number) B(['2']) --Precision--> I I --Value--> C(['5.16'])
- Make sure precision is set before the value is provided. Otherwise, you trigger another output when precision is set. (e.g. output1 = 5, output2 = 5.16)
- The value is never forgotten. This makes it impossible to set a new precision, without triggering an old output.