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:[EMAIL PROTECTED] 
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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to