from: 135 degrees
to: NW
Now, I was planning to write a series of if statements to evaluate e.g.,
if ($heading_degrees < 112.5 && $heading_degrees > 67.5) { $heading_compass = "N"; }
The works, but it will require
N, NNW, NNE, NE, NW, ENE, NWW... many IF statements.
Can anyone think of a programatically more elegant and efficient way of converting this type of data? (I suppose this is not really a problem, just a curiosity.)
...Rene
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php