orbital-engine
    Preparing search index...

    Function findNearestCandidate

    • The nearest candidate to (pointerX, pointerY), or null if nothing is within maxDistancePx — the pointer is in genuinely empty space, not just closer to one candidate than another. Ties (equal distance) resolve to whichever candidate appears first, for deterministic behaviour.

      Parameters

      • pointerX: number
      • pointerY: number
      • candidates: readonly ProximityCandidate[]
      • maxDistancePx: number

      Returns ProximityCandidate | null