Function tangentPoint

    • Tangent point on the circle (radius r, centre c) from external point p. side: -1 picks the CCW tangent from pc, +1 the CW (y-down screen coords flip the visual sense). Returns c if p is inside or on the circle.

      Parameters

      • p: V
      • c: V
      • r: number
      • side: -1 | 1 = -1

      Returns V