I have seen similar questions on here but just cannot get the math to work.
I have a circle, with two known points on the circumference (x1,y1,x2,y2) with the center of the circle as cx,cy
If I am stood at cx,cy and looking at point x1,y1 how can I tell which way I need to turn to face x2,y2?
So far I am working out the angle to each point
Atan((cx-x1) / (cy-y1)) Atan((cx-x2) / (cy-y2))
I have then tried a simple subtraction, using mod to ensure both are between -2pi and 2pi but I just get some strange answers. It appears the odd results occur when the two points lie above and below the horizontal line drawn through the center point.
But ill be honest I have tried so many things now my head hurts! It does not have to be a computationally fast solution as its only done once. Thanks in advance.