Re: Re: convert degrees to heading

From: Date: Fri, 16 Jul 2004 23:36:19 +0000
Subject: Re: Re: convert degrees to heading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190781@lists.php.net to get a copy of this message
In article <72138202E59CD6118E960002A52CD9D211FAAB88@n1025smx.nt.schwab.com>, 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: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]; >> } > -- Tim Van Wassenhove <http://home.mysth.be/~timvw>

« previous php.general (#190781) next »