Description
Reduce baseline-origin modulo step into [0, step) and divide by step for fraction.
A layout divides finite space among content, margins, gutters, and clearances. Counts describe how many gaps exist, while offsets and snapping describe where edges fall; changing either convention changes the resulting dimensions.
Reduce baseline-origin modulo step into [0, step) and divide by step for fraction.
When to use this tool
Use Baseline Grid Phase Offset when you need a local layout dimension or alignment check with explicit geometric inputs.
How to use the tool and how it works
- Enter baseline, origin, step. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read phase, fraction. Use the output convention below.
Require positive step. Reduce baseline-origin modulo step into [0, step) and divide by step for fraction.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| baseline | Baseline | Required. Finite number. |
| origin | Baseline-grid origin coordinate in the same length unit as baseline and step. | Required. Finite number. |
| step | Step | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| phase | Phase | Required. Finite number. |
| fraction | Dimensionless fraction, not percent: 0.1 represents 10%. | Required. Finite number. |
{
"input": {
"baseline": 7,
"origin": 0,
"step": 3
},
"output": {
"phase": 1,
"fraction": 0.3333333333333333
}
} Limitations and assumptions
- Coordinates share units and origin; this is a phase diagnostic without snapping, text shaping, font inspection, or a layout recommendation.
- 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
Construct the full layout in a design application and inspect its bounds. For overlapping or rotated content, use geometric intersection and containment rather than independent one-dimensional allowances.
References
Similar or alternative tools
- Baseline Grid Half Step Rule
Normalize coordinate around origin, round to the nearest grid index, resolve exact half steps by the selected policy, and return index and snapped coordinate.
- Grid Gutter Per Column Share
Divide nonnegative gutterWidth by positive columnWidth.