RE: [PHP] Re: convert degrees to heading
| From: | Vail, Warren | Date: | Fri, 16 Jul 2004 23:02:53 +0000 |
| Subject: | RE: [PHP] Re: convert degrees to heading | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-190772@lists.php.net to get a copy of this message | ||
Well, isn't north really about 340 to 020 degrees? Looks like if you threw
in a factor.....
Warren Vail
-----Original Message-----
From: René Fournier [mailto:m5@renefournier.com]
Sent: Friday, July 16, 2004 3:59 PM
To: Tim Van Wassenhove
Cc: php
Subject: Re: [PHP] Re: convert degrees to heading
Works beautifully. Thanks!
.Rene
On Friday, July 16, 2004, at 04:36 PM, Tim Van Wassenhove wrote:
> function degrees2compass($degrees)
> {
> $compass = array('N', 'NNW', 'NNE', 'NE', ...);
> $index = $heading_degrees / sizeof($compass);
> return $compass[$index];
> }
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php