Re: RE: [PHP] convert degrees to heading

From: Date: Wed, 15 Sep 2004 08:52:12 +0000
Subject: Re: RE: [PHP] convert degrees to heading
Groups: php.general 
Request: Send a blank email to php-general+get-196712@lists.php.net to get a copy of this message
Hi Trevor, > Very nice solution, Dave. I like simple, elegant and effective > solutions like this. I was wracking my brain yesterday to come up with > something like this, but my brain wasn't working. Hah. Good job! Thanks for the compliments - my head is now a bit bigger :-) I thought 0 degrees should have been east but thought you were using a "southern hemisphere" compass :-) Anyway, I went back and checked the original post :- > > I have to write a little function to convert a direction=20 > from degrees > > to a compass -type heading. 0 =3D West. 90 =3D North. E.g.: >=20 > Something like this... it'll account for >360 degrees, too.=20 > No different=20 > that a bunch of IF statements, though... which is what I coded for - which only goes to prove that the system will only be as good as the specification :-) Regards, Dave php/trevor-2004-09-15.tx TGryffyn@air-cargo-inc.com php-general,m5@renefournier.com +----------------------------------------------------------------------------+ | Dave Restall, IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. | | Tel. 0845 10 80 151 Mob. +44 (0) 7973 831245 Int. +44 (0) 1287 653003 | | email : dave@iirc.net dave@restall.net Web : http://www.iirc.net | +----------------------------------------------------------------------------+ | The last person that quit or was fired will be held responsible for | | everything that goes wrong -- until the next person quits or is fired. | +----------------------------------------------------------------------------+

« previous php.general (#196712) next »