Fixes issue #111 where heading 0 was incorrectly mapped to South.

This commit is contained in:
DennisOSRM 2012-02-09 11:22:32 +01:00
parent 78d6a25d98
commit 12c547126e

View File

@ -28,7 +28,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
struct Azimuth { struct Azimuth {
static std::string Get(const double heading) { static std::string Get(const double heading) {
if(heading <= 202.5) { if(heading <= 202.5) {
if(heading > 0 && heading <= 22.5) if(heading >= 0 && heading <= 22.5)
return "N"; return "N";
if(heading > 22.5 && heading <= 67.5) if(heading > 22.5 && heading <= 67.5)
return "NE"; return "NE";