Description
Select linearBranch only for cosine strictly above threshold and return cosine minus threshold as margin.
Quaternion interpolation represents rotations with unit four-component vectors, where opposite quaternion signs can represent the same orientation. Near-parallel and antipodal cases require explicit branch choices.
Select linearBranch only for cosine strictly above threshold and return cosine minus threshold as margin.
When to use this tool
Use Slerp Near Parallel Branch Margin when you need a rotation-interpolation branch or normalization diagnostic.
How to use the tool and how it works
- Enter cosine, threshold. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read linearBranch, margin. Inspect linearBranch before interpreting the associated values.
Require cosine in [-1, 1] and threshold in [0, 1]. Select linearBranch only for cosine strictly above threshold and return cosine minus threshold as margin.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| cosine | Cosine | Required. Finite number. |
| threshold | Threshold | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| linearBranch | Linear Branch | Required. Boolean. |
| margin | Signed allowance remaining under the calculation above. | Required. Finite number. |
{
"input": {
"cosine": 1,
"threshold": 0.5
},
"output": {
"linearBranch": true,
"margin": 0.5
}
} Limitations and assumptions
- The dot product and threshold are supplied; no vectors, angular distance, or actual interpolation are 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
Use a complete rotation library with an explicit shortest-path and interpolation-speed policy for actual orientation trajectories.
References
Similar or alternative tools
- Interpolation: Quaternion Nlerp Normalization Factor
Optionally negate the second when their dot product is negative, blend linearly, require a positive blend norm, and normalize.
- Knot Coalescence Distance
Compute abs(secondKnot - firstKnot).