Description
Return the shortest gap between two closed intervals on a periodic axis.
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 the shortest gap between two closed intervals on a periodic axis.
When to use this tool
Use Periodic Interval Shorter Gap when checking one explicit periodic-coordinate or gap convention.
How to use the tool and how it works
- Enter firstStart, firstEnd, secondStart, secondEnd, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gap. Use the output convention below.
Return the shortest gap between two closed intervals on a periodic axis. Require each ordered interval inside [0,period] and positive period; compare ordinary interval gaps at shifts zero and plus/minus period.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstStart | First Start | Required. Finite number; minimum 0. |
| firstEnd | First End | Required. Finite number. |
| secondStart | Second Start | Required. Finite number; minimum 0. |
| secondEnd | Second End | Required. Finite number. |
| period | Period | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gap | Gap | Required. Finite number. |
{
"input": {
"firstStart": 1,
"firstEnd": 2,
"secondStart": 8,
"secondEnd": 9,
"period": 10
},
"output": {
"gap": 2
}
} Limitations and assumptions
- Each input interval must be nonwrapping; split a seam-crossing interval beforehand.
- 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 Point Antipode Tie
Return shortest periodic point separation and exact antipodal status.
- Periodic Distance Half Cell Ambiguity Label
Return minimum periodic separation and a half-cycle ambiguity flag.