GreaterThanOrEqual
Float
≥ (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 ifa
is greater than or equal tob
, false otherwise.
Configuration
This node has no configuration options.
Usage
- Connect the first number to compare to the
a
input. - Connect the second number to compare to the
b
input. - The
result
output will emit a boolean value indicating whethera
is 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
a
input of the ≥ node. - Connect a constant value of 18 to the
b
input of the ≥ node. - Connect the
result
output of the ≥ node to a branch node. - If
result
is true, the user is 18 or older, so route them to the age-restricted content. - If
result
is 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
a
andb
inputs 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
a
andb
are equal, theresult
will be true.
Common Issues
- If the
result
is always false even when you expect it to be true, double-check that you’ve connected the inputs in the correct order (a
should 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.