Skip to content

Commit

Permalink
Fix code comment with last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Coffee-- committed May 18, 2014
1 parent 829b74c commit ad8b0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map_location.cpp
Expand Up @@ -215,8 +215,8 @@ map_location::DIRECTION map_location::get_relative_dir(map_location loc) const
if (dx==0 && dy==0) return NDIRECTIONS;

int dist = abs(dx); // Distance from north-south line
int dist_diag_SW_NE = abs(dy + (dx + (dy>0?0:1) )/2); // Distance from diagonal line SE-NW
int dist_diag_SE_NW = abs(dy - (dx - (dy>0?0:1) )/2); // Distance from diagonal line SW-NE
int dist_diag_SW_NE = abs(dy + (dx + (dy>0?0:1) )/2); // Distance from diagonal line SW-NE
int dist_diag_SE_NW = abs(dy - (dx - (dy>0?0:1) )/2); // Distance from diagonal line SE-NW

if (dy > 0) dir = SOUTH;
else dir = NORTH;
Expand Down

0 comments on commit ad8b0da

Please sign in to comment.