Description
Choose anchor as the desired start or anchor - size as the desired start for end bias.
A list window uses a start and exclusive end or a center and radius. Boundary clamping, padding, and half-integer centers are separate conventions.
Choose anchor as the desired start or anchor - size as the desired start for end bias.
When to use this tool
Use List Window Start End Bias when you need an explicit window position or edge-padding budget.
How to use the tool and how it works
- Enter length, size, anchor, bias. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read start, end. Use the output convention below.
Choose anchor as the desired start or anchor - size as the desired start for end bias. Clamp that start into [0, length - size] and return its half-open end.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| length | Length | Required. Safe integer; minimum 0. |
| size | Size | Required. Safe integer; minimum 0. |
| anchor | Anchor | Required. Safe integer; minimum 0. |
| bias | Bias | Required. Text; one of "start", "end"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| start | Start | Required. Safe integer. |
| end | End | Required. Safe integer. |
{
"input": {
"length": 10,
"size": 4,
"anchor": 9,
"bias": "start"
},
"output": {
"start": 6,
"end": 10
}
} Limitations and assumptions
- Size cannot exceed length; clamping preserves window size and can shift the requested anchor relationship near an edge.
- 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
Inspect actual list bounds and choose whether to shift, truncate, or pad windows before extracting data.
References
Similar or alternative tools
- List Window Centered Padding Budget
For a valid center and nonnegative radius, return max(0, radius - center) left padding and max(0, center + radius - length + 1) right padding.
- List Window Center Offset
Return startIndex + (windowLength - 1) / 2 for centerIndex and subtract referenceIndex for offset.