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
| Data | Description |
|---|---|
| First Number | The dividend (the number to be divided). Default: 0. |
| Second Number | The divisor (the number to divide by). Default: 1. Cannot be 0. |
Actions
| Signal | Description |
|---|---|
| Do | Triggers the division calculation. |
| Reset | Resets inputs (First: 0, Second: 1) and result to 0. Clears errors. |
Outputs
Data
| Data | Description |
|---|---|
| Result | The quotient (First / Second). |
Signals
| Signal | Description |
|---|---|
| Done | Triggered when the calculation is successfully completed. |
| Reset Done | Triggered when the Reset action is completed. |
Usage
Used for splitting values, calculating ratios, percentages, and scaling down.
Example Use Cases
- Average Calculation:
Total Sum÷Count. - Percentage: (
Part÷Whole) × 100 (requires Multiplication node for the ×100). - Speed:
Distance÷Time. - Layout: Dividing width by number of columns.
Detailed Behavior
- Division by Zero:
- If
Second Numberis set to0, the node enters an error state: "Division by zero is not allowed". - Calculation aborts, and
Doneis not signaled.
- If
- 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.
- Defaults:
- Unlike other math nodes,
Second Numberdefaults to 1 to prevent immediate division-by-zero errors on initialization.
- Unlike other math nodes,
Troubleshooting
- No Result: Check if your
Second Numberis 0. This is the most common cause of failure. - Precision: Be aware of floating-point precision issues (e.g.,
0.1 + 0.2logic in JS). For integer division, you may want to chain this with aFloororRoundnode.