In article <[EMAIL PROTECTED]>, Warren Vail wrote:
> Well, isn't north really about 340 to 020 degrees?  Looks like if you threw
> in a factor.....

Well, modulo is a nice function. But i'm not the homework service :)

> 
> 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];
>> }
> 


-- 
Tim Van Wassenhove <http://home.mysth.be/~timvw>

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

Reply via email to