View Single Post
  #29   Spotlight this post!  
Unread 21-07-2011, 20:22
Strants Strants is offline
Registered User
AKA: Gavin Stewart
FRC #1977
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Colorado
Posts: 11
Strants is an unknown quantity at this point
Re: Cartesian to angle

Just out of curiosity, would it be more beneficial for the algorithm to give angles in the range (0, 2pi], or [0, 2pi)? (Our team doesn't usually have to do much with angle conversions.) For getting angles in (0, 2pi], the method Dmentor suggested seems best; for the latter, something like pi - atan2(-x, y) seems like it would work.