Let $C$ be a circle with center $(c_x,c_y)$ and radius $r$
Let $s$ be a segment that starts in $(c_x,c_y)$ and ends in a point $(x, y)$ outside $C$
How can I find the point $P=(p_x,p_y)$ where $s$ intersects $C$ ?
I thought about writing the line equation from $(c_x,c_y)$ and $(x, y)$, than find the intersection of $s$ and $C$, and from the $2$ results, apply some filter to get the result I expect, but I wonder if there is a way more straightforward than that.