minuteToX()
function minuteToX(
panels,
minute,
period
): number;Defined in: packages/core/src/momentum/layout.ts:131
The x of a match minute in a given period: period is the period's
number, 1 for the first half, so it selects panels[period - 1].
The period is what tells overlapping minutes apart. Minutes restart at 45 for the second half, so a first half with stoppage time and the second half both contain 45'-48', and the minute alone can't say which is meant.
A minute outside its period is clamped to that period's edge. A period with no panel falls back to the panel nearest the minute, clamped the same way. 0 when there are no panels.
Parameters
| Parameter | Type |
|---|---|
panels | readonly MomentumPanel[] |
minute | number |
period | number |
Returns
number