Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



locate value within period
Posted:
Aug 31, 2010 3:17 AM


All,
Given a value of theta, I need to add or subtract integer multiples of 2 pi, so that the value lies in [0, 2pi). I tried something like:
n = int(theta/(2 Pi)
and
theta = theta  n*2*pi
but that does not work in all cases. What is the best way to do this ?
Thanks
Sam



