Suppose I am moving in a certain compass bearing (e.g. $270^\circ$) and I want to be going in a different direction (e.g. $120^\circ$). Is there a formula or series of math operations that I can use to determine which direction I should turn (I want the shorter direction)?
I've tried to increase my angle, i.e. turn counterclockwise, if $\text{target bearing} - \text{current bearing} < 360 - (\text{target bearing} - \text{current bearing})$, and it only seems to work in some cases.
Please help! I've been having lots of trouble.