Description
Return period minus the last position plus the first for wrapGap.
Half-open list ranges include their start and exclude their end. Empty and touching ranges can be disjoint even when their boundary coordinates coincide.
Return period minus the last position plus the first for wrapGap.
When to use this tool
Use List Neighbor Gap Cyclic Endpoint when you need a precise range relationship for a list operation.
How to use the tool and how it works
- Enter positions, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read wrapGap. Use the output convention below.
Require strictly increasing positions in [0, period). Return period minus the last position plus the first for wrapGap.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| positions | Positions | Required. Array of finite number; maximum items 256. |
| period | Period | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| wrapGap | Wrap Gap | Required. Finite number. |
{
"input": {
"positions": [
2,
5,
8
],
"period": 10
},
"output": {
"wrapGap": 4
}
} Limitations and assumptions
- A singleton returns a full-period gap; duplicate or unsorted positions are rejected.
- 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
Validate ranges against the actual list length and the operation's overlap policy before mutating data.
References
Similar or alternative tools
- List Circular Slice Length
Return the forward modular distance from start to end.
- List Cycle One Step Predecessor
Subtract one from a valid index and reduce modulo positive length for predecessor.