Calculating the difference of rotation states
Is it possible to calculate the difference of rotation states? 359 and 0 should make 1 not 359.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 6, 2013, 9:13 AM EDT
Try this revised version:
The output should be:
VulpesRank #55 · 29.2K reputationPosted Apr 6, 2013, 4:24 AM EDT
NameHere9 reputationPosted Apr 6, 2013, 5:19 AM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 6, 2013, 6:07 AM EDT
When I ran it, the output was:
The difference between 0 and 359 degrees is 1
Of course if you reverse the operands so that you're subtracting 0 from 359 the result will be 359 because the subtraction method always works in a clockwise direction.
NameHere9 reputationPosted Apr 6, 2013, 6:33 AM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 6, 2013, 6:51 AM EDT
-12 is treated as 348, less 7, equals 341.
Anyway, if these are not the answers you're expecting, then you should make it clear what you do want.
NameHere9 reputationPosted Apr 6, 2013, 6:53 AM EDT
NameHere9 reputationPosted Apr 7, 2013, 12:44 AM EDT