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 [EMAIL PROTECTED]
php-general,[EMAIL PROTECTED]
+----------------------------------------------------------------------------+
| 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 : [EMAIL PROTECTED] [EMAIL PROTECTED] 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. |
+----------------------------------------------------------------------------+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php