Description
Return minimum periodic separation and a half-cycle ambiguity flag.
A periodic coordinate identifies values separated by a whole cycle. Minimum-image gaps require a wrapping interval and an explicit half-cycle tie convention; signed direction and unsigned separation answer different questions.
Return minimum periodic separation and a half-cycle ambiguity flag.
When to use this tool
Use Periodic Distance Half Cell Ambiguity Label when checking one explicit periodic-coordinate or gap convention.
How to use the tool and how it works
- Enter difference, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read distance, ambiguous. Inspect ambiguous before interpreting the associated values.
Return minimum periodic separation and a half-cycle ambiguity flag. Require period > 0; wrap difference, take the smaller complementary gap and test exact remainder === period/2.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| difference | Difference | Required. Finite number. |
| period | Period | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| distance | Distance | Required. Finite number. |
| ambiguous | Ambiguous | Required. Boolean. |
{
"input": {
"difference": 5,
"period": 10
},
"output": {
"distance": 5,
"ambiguous": true
}
} Limitations and assumptions
- No signed direction is selected at the half-cycle tie.
- 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 periodic geometry model when multiple axes, seam-crossing intervals or path winding matter.
References
Similar or alternative tools
- Periodic Interval Shorter Gap
Return the shortest gap between two closed intervals on a periodic axis.
- Periodic Box Wrap One Axis
Wrap a coordinate into a declared periodic box and return its image index.