greaterThanEqual
Performs a 'greater than or equal to' (>=) comparison on two inputs, crucial for threshold checks and logical branching that must include the boundary value.
Core Advantages
Provides the most intuitive and efficient way to perform precise, inclusive boundary comparisons, avoiding the complexity and performance overhead of simulating the operation with multiple nodes.
Common Uses
Creating stepped or segmented effects where the starting boundary of a level is included.
Determining if a value falls within a closed interval, `[min, max]`.
Triggering state changes in animations precisely at a specific time (inclusive).
In procedural geometric cutting, keeping the cutting plane itself along with the geometry on one side.
How to adjust
Adjust its threshold input. The key difference from `greaterThan` is at the boundary: with `greaterThanEqual`, the condition is met even when the input value is exactly equal to the threshold. For example, if a character is on tile X=5, `greaterThanEqual(position.x, 5)` will light up their tile, whereas `greaterThan` would not.
Code Examples
1// Create discrete vertical levels (0 to 4)
2const level = floor(uv().y.mul(5));
3
4// Check if the current level is greater than or equal to 2
5const isPlatform = greaterThanEqual(level, 2);