Difference
Last updated
Last updated
The Difference node calculates the absolute difference between two numbers. It's useful for measuring the gap between values while disregarding which is larger.
A
First number in the comparison
Number
No
B
Second number in the comparison
Number
No
Precision
How many decimal places to round to
Number
No
Difference
The absolute difference between A and B
Number
Drag the Difference node into your graph.
Connect your first number to the "A" input (e.g., 7.84
) or use the default (0
).
Connect your second number to the "B" (e.g., 13
) input or use the default (0
).
Optionally set the "Precision" input (defaults to 2 decimal places).
The output will be the absolute value of the difference between the two numbers (e.g., 5.16
)
The result is always positive, regardless of which input is larger.
Use the precision input to control rounding (e.g., 0 for integers, 2 for cents).
Contrast Measurement: Calculate the difference between foreground and background colors.
Error Margins: Determine how far a value deviates from a target.
Spacing Consistency: Check the difference between actual and intended spacing values.
: For getting the absolute value of a single number.
: For getting the signed difference between numbers.