selectGoal()
function selectGoal(
point,
goals,
which
): Line;
Defined in: packages/core/src/geometry/goal-angle.ts:31
Picks which of the pitch's two goals (computePitchGeometry(dimensions).goals)
a goal-angle mark should measure against. "nearest" compares distance
from point to each goal's midpoint — the usual default, since a shot's
angle is normally read against the goal it's aimed at, not a fixed side.
Parameters
| Parameter | Type |
|---|---|
point | Point |
goals | readonly [Line, Line] |
which | "left" | "right" | "nearest" |