Skip to content

Commit

Permalink
Translate wind directions.
Browse files Browse the repository at this point in the history
  • Loading branch information
BevapDin authored and kevingranade committed Jul 15, 2019
1 parent a6a7230 commit 7d30176
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,21 +770,21 @@ std::string get_shortdirstring( int angle )
std::string dirstring;
int dirangle = angle;
if( dirangle <= 23 || dirangle > 338 ) {
dirstring = "N";
dirstring = _( "N" );
} else if( dirangle <= 68 && dirangle > 23 ) {
dirstring = "NE";
dirstring = _( "NE" );
} else if( dirangle <= 113 && dirangle > 68 ) {
dirstring = "E";
dirstring = _( "E" );
} else if( dirangle <= 158 && dirangle > 113 ) {
dirstring = "SE";
dirstring = _( "SE" );
} else if( dirangle <= 203 && dirangle > 158 ) {
dirstring = "S";
dirstring = _( "S" );
} else if( dirangle <= 248 && dirangle > 203 ) {
dirstring = "SW";
dirstring = _( "SW" );
} else if( dirangle <= 293 && dirangle > 248 ) {
dirstring = "W";
dirstring = _( "W" );
} else if( dirangle <= 338 && dirangle > 293 ) {
dirstring = "NW";
dirstring = _( "NW" );
}
return dirstring;
}
Expand All @@ -795,21 +795,21 @@ std::string get_dirstring( int angle )
std::string dirstring;
int dirangle = angle;
if( dirangle <= 23 || dirangle > 338 ) {
dirstring = "North";
dirstring = _( "North" );
} else if( dirangle <= 68 && dirangle > 23 ) {
dirstring = "North-East";
dirstring = _( "North-East" );
} else if( dirangle <= 113 && dirangle > 68 ) {
dirstring = "East";
dirstring = _( "East" );
} else if( dirangle <= 158 && dirangle > 113 ) {
dirstring = "South-East";
dirstring = _( "South-East" );
} else if( dirangle <= 203 && dirangle > 158 ) {
dirstring = "South";
dirstring = _( "South" );
} else if( dirangle <= 248 && dirangle > 203 ) {
dirstring = "South-West";
dirstring = _( "South-West" );
} else if( dirangle <= 293 && dirangle > 248 ) {
dirstring = "West";
dirstring = _( "West" );
} else if( dirangle <= 338 && dirangle > 293 ) {
dirstring = "North-West";
dirstring = _( "North-West" );
}
return dirstring;
}
Expand Down

0 comments on commit 7d30176

Please sign in to comment.