Compare
Checks how two numbers relate and gives true or false.
Parameters
| Name | Type | Description |
|---|---|---|
| Resultoutput | 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, so Greater is true when Value 1 is greater than Value 2.Choices: Greater, Greater or Equal, Less, Less or Equal, Equal, Not Equal |
| 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 Equal and Not Equal. |
The Compare operator checks whether one number is smaller than, larger than or equal to another, and gives true or false. Use it to turn a number into a yes or no, such as a signal passing a threshold.
Animated values rarely land on exactly the same number. To test them with Equal or Not Equal, give the tolerance a small value.
See also Compare for textures.
Keywords: less than, greater than, equal, threshold, condition, boolean