Hey all,
Anyone have an abstraction handy that converts from an XZ Gem plane (-4 on left to 4 on right, -4 in back +4 in front) to degrees? (0 to 360? 0 in front at (0,-4) and 180 behind at (0,4)
I'm trying to use cart2sph and rad2deg, but I'm getting negative numbers, I just want degrees from 0-359.
Thanks! .b.
Zitat von "B. Bogart" ben@ekran.org:
I'm trying to use cart2sph and rad2deg, but I'm getting negative numbers, I just want degrees from 0-359.
well, degree have a range of 360 and will eventually wrap somewhere. if they wrap at [-180, 180) or [0, 360) doesn't (shouldn't!) really matter: -90°==270°.
you can build an abstraction to do the mapping from [-180, 180) to [180,360)+[0,180), or just use [wrap 0 360] (that was one of the reasons why i wrote it)
mfg.asdr IOhannes