Skip to main content

Equal

This node checks if two numbers are strictly equal.

The Equal node performs an equality comparison (===) and routes signals based on the result.

The Equal node compares two numeric inputs. It evaluates whether First Number is strictly equal to Second Number. It provides both a boolean data output and signal outputs for conditional logic flow.

Inputs

Numbers

DataDescription
First NumberThe first number to compare. Default: 0.
Second NumberThe second number to compare. Default: 0.

Actions

SignalDescription
DoTriggers the comparison. The logic is only executed when this signal is received.

Outputs

Data

DataDescription
ResultThe boolean result of First Number === Second Number.

Signals

SignalDescription
True ConditionTriggered if the numbers are equal.
False ConditionTriggered if the numbers are not equal.
DoneTriggered after the comparison is complete, regardless of the result.

Usage

Use this node to check for exact numeric matches.

Example Use Cases

  1. Target Reached: Check if Current Progress == Target.
  2. State Check: Check if Current Page Index == 2.
  3. Zero Check: Check if Inventory Count == 0 (Empty).

Detailed Behavior

  1. Strict Equality: The node uses the === operator.
  2. Validation: Inputs must be valid numbers within the ±1 trillion range.
  3. Signal Flow:
    • When Do is triggered, the node calculates the result.
    • It updates the Result output.
    • It emits either True Condition or False Condition.
    • Finally, it emits Done.

Troubleshooting

  • Floating Point Errors: Be careful when comparing floating-point numbers (e.g., 0.1 + 0.2 might not exactly equal 0.3 in standard computing). For floats, it is often safer to check if the difference is very small (using Subtraction, Abs, and Less Than) rather than strict equality.