|
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.
|