≥ (Greater Than or Equal)
The ≥ node compares two floating-point numbers and outputs a boolean value indicating whether the first input is greater than or equal to the second input.Inputs
a(float, default: 0): The first number to compare.b(float, default: 0): The second number to compare.
Outputs
result(boolean): True ifais greater than or equal tob, false otherwise.
Configuration
This node has no configuration options.Usage
- Connect the first number to compare to the
ainput. - Connect the second number to compare to the
binput. - The
resultoutput will emit a boolean value indicating whetherais greater than or equal tob.
Example
Suppose you have a spell that needs to check if a user’s age is greater than or equal to 18 before allowing them to access certain content. You can use the ≥ node to perform this comparison.- Connect the user’s age (e.g., from a form input or database) to the
ainput of the ≥ node. - Connect a constant value of 18 to the
binput of the ≥ node. - Connect the
resultoutput of the ≥ node to a branch node. - If
resultis true, the user is 18 or older, so route them to the age-restricted content. - If
resultis false, the user is under 18, so route them to an appropriate message or alternative content.
Best Practices
- Ensure that the values connected to the
aandbinputs are valid floating-point numbers. If either input is not a number, the node will output false. - Remember that the comparison is “greater than or equal to,” so if
aandbare equal, theresultwill be true.
Common Issues
- If the
resultis always false even when you expect it to be true, double-check that you’ve connected the inputs in the correct order (ashould be the value you expect to be greater than or equal tob). - Be cautious when comparing floating-point numbers for equality, as rounding errors can sometimes cause unexpected results. If you need to check for equality, consider using a small tolerance value rather than comparing directly.
