Compare
Checks how two numbers relate and gives true or false.
Parameters
| Name | Type | Description |
|---|---|---|
| Valueoutput | Bool | True when the comparison holds. |
| Value 1 | Float | The number on the left of the comparison. |
| Operation | Enum | How the two numbers are compared, read from left to right.Choices: <, <=, >, >=, ==, != |
| Value 2 | Float | The number on the right of the comparison. |
| Tolerance | Float | How far apart two numbers may be and still count as equal. Only used by == and !=. |
Compare checks whether one number is smaller than, larger than or equal to another. The result is true or false, which makes it the usual way to turn a number into a yes or no. The comparison reads from left to right: with < the result is true when Value 1 is less than Value 2.
Animated values rarely land on exactly the same number, so == and != treat two numbers within the tolerance of each other as equal. The other operations compare exactly.
A common use is a threshold: compare a signal against a level and use the result to turn something on or off.
Keywords: less than, greater than, equal, threshold, condition, boolean