MAX
The MAX node is a utility node that takes two floating-point numbers as input and outputs the larger of the two values. It provides a simple way to compare numbers and select the maximum value within a spell.Inputs
a(float, default: 0): The first number to compare.b(float, default: 0): The second number to compare.
Outputs
result(float): The maximum value between the two input numbers.
Configuration
This node does not have any configuration options.Usage
To use the MAX node, follow these steps:- Add the MAX node to your spell.
- Connect the
ainput to the first number you want to compare. - Connect the
binput to the second number you want to compare. - The
resultoutput will provide the maximum value between the two input numbers.
Example
Here’s an example of how to use the MAX node in a spell:Best Practices
- Use the MAX node when you need to select the larger value between two numbers in your spell logic.
- Connect the
aandbinputs to the appropriate number sources in your spell. - Remember that the MAX node only works with floating-point numbers. If you need to compare integers, use the MAX (Integer) node instead.
Common Issues
- Ensure that both
aandbinputs are properly connected to number sources. If either input is left unconnected, the MAX node will use the default value of 0. - Be aware that the MAX node does not handle non-numeric inputs. Connecting a non-numeric value (e.g., a string) to either input will result in an error.
