Line circle intersection

From Rosetta Code

Implement a method that takes as a parameter:

  • starting point of line
  • point where line ends
  • center point of the circle
  • circle radius

return 2 intersection points return 1 intersection point if only 1 point intersect