PitchKit
API Reference@pitchkit/coreFunctions

valueAtTime()

function valueAtTime(points, time): number;

Defined in: packages/core/src/race/cumulative.ts:85

The cumulative value of a series at time.

Step-after semantics: the value at time t is the running total of the last event at or before t. Before the first event that is 0 (the kick-off anchor); after the last it is the final total, out to full time.

Binary search rather than a scan because this is called once per series per pointer move by the crosshair, not once per render.

Parameters

ParameterType
pointsreadonly RacePoint[]
timenumber

Returns

number

On this page