Description
Optionally clamp a supplied normalized dot product to the interval from minus one to one.
A signed geometric quantity depends on its reference orientation: reversing a normal changes the distance sign without changing the plane. A normalized dot product belongs to [-1,1] for valid unit vectors, but a supplied scalar can fall outside that interval. A sign switch or clamp changes that scalar convention without establishing the underlying geometry.
Optionally clamp a supplied normalized dot product to the interval from minus one to one.
When to use this tool
Use Vector Normalized Dot Domain Clamp when you already have suppliedNormalizedDot, clampToUnitInterval and need to optionally clamp a supplied normalized dot product to the interval from minus one to one.
How to use the tool and how it works
- Enter suppliedNormalizedDot, clampToUnitInterval. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read boundedDot, outsideUnitInterval. Inspect outsideUnitInterval before interpreting the associated values.
outsideUnitInterval means abs(suppliedNormalizedDot)>1 before clamping. Return the original value or min(1,max(-1,value)) according to clampToUnitInterval.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| suppliedNormalizedDot | Supplied Normalized Dot | Required. Finite number. |
| clampToUnitInterval | Clamp To Unit Interval | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| boundedDot | Original scalar unless clamping is enabled; no normalization is performed. | Required. Finite number. |
| outsideUnitInterval | Computed before clamping; abs(original)>1. | Required. Boolean. |
{
"input": {
"suppliedNormalizedDot": 1.0000000000000002,
"clampToUnitInterval": true
},
"output": {
"boundedDot": 1,
"outsideUnitInterval": true
}
} Limitations and assumptions
- No vectors are normalized or checked; clamping can conceal inconsistent inputs and no angle is calculated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Work from the actual vectors and plane normal when geometric validity matters. Normalize nonzero vectors before interpreting a dot product as an angle input, and calculate a full reflection when point or vector coordinates are required.
References
Similar or alternative tools
- vector/normalize
Normalize a nonzero numeric vector to unit Euclidean magnitude.
- vector/dot-product
Calculate the scalar dot product of equal-length numeric vectors.