Normalizing latitude and longitude in C++
Posting here for convenient lookup later. There are numerous ways these angles can be “normalized”, but typically we want a latitude between -90 and 90 and a longitude between -180 and 180 (e.g., instead of allowing a longitude of 270, etc.). I’m including boilerplate conversions between radians and degrees here as well.
Normalizing latitude and longitude in C++ Read More »