Equal
Integer
Equal (Integer)
The Equal (Integer) node compares two integer inputs and outputs a boolean value indicating whether they are equal.
Inputs
a
(integer): The first integer value to compare. Default value is 0.b
(integer): The second integer value to compare. Default value is 0.
Outputs
result
(boolean): The result of the equality comparison. Returnstrue
if the two input integers are equal, andfalse
otherwise.
Configuration
This node has no additional configuration options.
Usage
- Connect the first integer value to compare to the
a
input. - Connect the second integer value to compare to the
b
input. - The
result
output will emittrue
if the two input integers are equal, andfalse
otherwise.
Example
Here’s an example of how to use the Equal (Integer) node in a Magick spell:
In this example, two Integer Input nodes are providing the values 42 and 42 to the a
and b
inputs of the Equal (Integer) node. The result
output is then connected to a Boolean Output node. Since both input values are 42, the result
will be true
.
Best Practices
- Ensure that the values connected to the
a
andb
inputs are of type integer. Connecting other data types may lead to unexpected behavior. - Remember that this node performs an exact equality check. For checking if one integer is greater than or less than another, use the Greater Than (Integer) or Less Than (Integer) nodes instead.
Common Issues
- If either of the
a
orb
inputs are left disconnected, the node will use the default value of 0 for that input. This may lead to unintended results. Always ensure both inputs are properly connected.