MAX
The MAX node is a utility node that takes two integer inputs and outputs the larger of the two values. It provides a simple way to compare two numbers and select the maximum value within a spell.Inputs
a(integer, default: 0): The first integer value to compare.b(integer, default: 0): The second integer value to compare.
Outputs
result(integer): The maximum value between the two input integers.
Configuration
This node does not have any additional configuration options.Usage
To use the MAX node, follow these steps:- Add the MAX node to your spell.
- Connect the two integer values you want to compare to the
aandbinputs of the node. - The node will output the larger of the two input values through the
resultoutput. - Connect the
resultoutput to the desired destination node or use it as needed in your spell.
Example
Here’s an example of how to use the MAX node in a spell:Best Practices
- Ensure that the inputs connected to the MAX node are of the correct type (integer). Connecting inputs of different types may lead to unexpected behavior.
- Use the MAX node when you need to compare two integer values and select the larger one. It’s a simple and efficient way to make decisions based on numeric comparisons.
Common Issues
- If either of the inputs is not connected or receives a non-integer value, the MAX node will use the default value of 0 for that input. Make sure to properly connect and provide integer values to the inputs to avoid unintended results.
