Say I have a point A at (1,3) and a point B at (2,1) and point B has an angle of 45 degrees. I need a formula that will tell me which direction (right or left) B should turn so it points at A the fastest.
I originally pretended that B was the center of a circle and A was on the ring of the circle. I then found the area of the sector and stored my results in SECTOR_AREA.
Next, I took the full area of the circle and divided it by 2 and called it HALF_AREA.
If SECTOR_AREA > HALF_AREA then TURN RIGHT
If SECTOR_AREA < HALF_AREA then TURN LEFT
The problem is I'm getting strange results with this ^^^ formula ^^^ and it's not working. I'm not sure why? Should it work? Might I have entered the wrong formula? What would be a good alternative to this?