Line circle intersection: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "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")
 
No edit summary
Line 6: Line 6:


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

Revision as of 04:28, 4 March 2020

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