In the image below, the diameter of the circle is 100, and x1=50 and y1=50 for the line's starting point in the middle.

I'd like to be able to draw the line so that it is pointing at different parts of the outer circle, similar to a clock hand. Meaning I need a formula for calculating the line's x2 and y2.
What is the equation to calculate x2 and y2?