-2

I'm working with a robot and right now the angle is setup to be between -179 to 180. The thing is the angle accumulation is opposite that of cartesian coords which is a headache. So if the robot is facing 90 degrees and turns 45 to the left: instead of being 135 it is 45 and if it is facing 0 degrees, the angle should read as 180.

How would I go about converting the angle to something I can use more effectively? i.e the angle needs to be flipped across the y axis if imagined in the scope of the cartesian plane.

1 Answers1

0

I figured it out bozos, thanks for the useful responses for the junior coder. Anyways if anyone ever has this problem for whatever reason:

(90 - CurrentAngle) + 90;

Then the angle has to be rewrapped to the 180/-179 plane.