I know the following:
- my own position
- my own facing (the angle im turned)
- my targets position
What i would like some help with is how i calculate the shortes way to turn and the angle to turn. If i my position was (4,4) and i faced 90 degrees and my target was to face (1,1) where my target is, i know by drawing it on some paper that the shortest way to rotate is counter-clockwise 135 degrees.
But how do i calulate this? Ive tried using tangent, but using sine seems just as easy. Any ideas?