[PD-dev] Gem units to degrees

zmoelnig at iem.at zmoelnig at iem.at
Tue Apr 11 07:53:23 CEST 2006


Zitat von "B. Bogart" <ben at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1718 bytes
Desc: ?ffentlicher PGP-Schl?ssel
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20060411/09b4c65b/attachment.key>


More information about the Pd-dev mailing list