Distance from point in circle to edge of circle The situation is as follows:
I have a circle with a diameter of $20$ and a center at $(0,0)$.
A point $P$ inside that circle is at $(2,0)$.
How do I calculate the distance from $P$ to the edge of the circle for a given angle $\theta$?

Let the centre of the circle be $O$, and let the point $(2,0)$ be $P$. Draw a line $PQ$ to the periphery of the circle, making an angle $\theta$ with the positive $x$-axis. We want to find the length of $PQ$.
Consider the triangle $OPQ$. We have $\angle OPQ=180^\circ-\theta$. By the Cosine Law, with $x=PQ$, we have
$$100=x^2+4-(2x)(2\cos(180^\circ-\theta))=x^2+4+4x\cos\theta.$$
This is a quadratic equation in $x$: Solve.
