what is easier 0 to TWO_PI or -PI to PI

edited December 2013 in General Discussion

(hope this is the right forum section) What is easier to work with, values in the range of 0 to TWO_PI or values in the range from -PI to PI? Or doesn't it really matter. If one is prefered please give an example where it shows off.

Answers

  • It would only matter at a sketch specific level for minor speed improvements if you can take advantage of negative numbers or not. Otherwise there should be no difference.

    Personally I prefer 0 to TWO_PI to avoid negatives

  • other people also prefer that?

  • I'm with asimes - 0 to TWO_PI to avoid negatives. Also if you keep on adding to the angle then %TWO_PI is easier to deal with than adjusting for -PI to PI.

Sign In or Register to comment.