node compare - blossommerz/locus-hub GitHub Wiki
< Previous: Vector Math | Next: Switch >
Ask a question about a number and get a true or false back.
Category: Data | Add menu: Data > Compare
- A (number, editable): the value being asked about.
- B (number, editable): what to measure it against.
- Operator: a pulldown, set to Less Than until you change it. Less Than, Less or Equal, Equal, Not Equal, Greater or Equal, Greater Than. Wire something in and the node graph picks the operator instead.
- Tolerance (number, editable, default 0.001): how close counts as equal.
- Condition (boolean): the answer.
The question half of a decision. On its own it just answers; wired into Select by Condition it becomes a filter, so you can sort geometry by a measurement rather than by hand.
A and B each take a list as well as a single number, so feeding a per-item measurement against one constant answers the question once per item and hands back a list of answers.
Comparing computed numbers for exact equality is a trap: two values that should match often differ in the last decimal place. Tolerance is the slack that makes Equal usable. It applies to Equal and Not Equal only, and it is the same slack either way, so Not Equal is exactly the opposite of Equal.
< Previous: Vector Math | Next: Switch >
