Circle Line segment intersection I have a circle with radius r and center $(c_x, c_y)$. I have a line segment $(x_1, y_1)$ and $(x_2, y_2)$ given $(x_2, y_2)$ is always a point inside the circle. 
I am trying to find the intersection between the circle and the line segment. I have tried the tangent formula that mentioned here i am not sure if it works in my case.


The equation of the circle is:
$$(x-c_x)^2+(y-c_y)^2=r^2$$
The equation of the line is:
$$y-y_1=\frac{y_2-y_1}{x_2-x_1} (x-x_1) \ \ \ (*)$$
To find the intersection solve at the $(*)$ for $y$ and replace it at the equation of the circle.
