Skip to main content

Division

This node divides one number by another and returns the quotient.

The Division node performs mathematical division with protection against division by zero.

The Division node calculates the quotient of two numbers (First Number ÷ Second Number). It includes critical safety checks to prevent division by zero and ensures results remain within safe numerical limits.

Inputs

Numbers

DataDescription
First NumberThe dividend (the number to be divided). Default: 0.
Second NumberThe divisor (the number to divide by). Default: 1. Cannot be 0.

Actions

SignalDescription
DoTriggers the division calculation.
ResetResets inputs (First: 0, Second: 1) and result to 0. Clears errors.

Outputs

Data

DataDescription
ResultThe quotient (First / Second).

Signals

SignalDescription
DoneTriggered when the calculation is successfully completed.
Reset DoneTriggered when the Reset action is completed.

Usage

Used for splitting values, calculating ratios, percentages, and scaling down.

Example Use Cases

  1. Average Calculation: Total Sum ÷ Count.
  2. Percentage: (Part ÷ Whole) × 100 (requires Multiplication node for the ×100).
  3. Speed: Distance ÷ Time.
  4. Layout: Dividing width by number of columns.

Detailed Behavior

  1. Division by Zero:
    • If Second Number is set to 0, the node enters an error state: "Division by zero is not allowed".
    • Calculation aborts, and Done is not signaled.
  2. Validation:
    • Inputs must be valid numbers.
    • Result must be finite and within ±1,000,000,000,000.
    • Infinite results (e.g., from very large / very small numbers) are caught and treated as errors.
  3. Defaults:
    • Unlike other math nodes, Second Number defaults to 1 to prevent immediate division-by-zero errors on initialization.

Troubleshooting

  • No Result: Check if your Second Number is 0. This is the most common cause of failure.
  • Precision: Be aware of floating-point precision issues (e.g., 0.1 + 0.2 logic in JS). For integer division, you may want to chain this with a Floor or Round node.