Quote:
Originally Posted by plnyyanks
edit: here's a VI I quickly wrote up that demonstrates both of the methods Ether wrote up: Attachment 12945
|
Thanks Phil. For any C programmers who may be lurking, here's how to do it in C:
Code:
error -= 360*floor(0.5+error/360);
That converts any angle to the equivalent minimum absolute value, with the correct sign.