cpp/openlocationcode.cc
// Normalize a longitude into the range -180 to 180, not including 180.
Normalize a longitude into the range -180 to 180, not including 180.
Normalize a longitude into the range - 180 to 180 not including 180 .
double normalize_longitude(double longitude_degrees) {
  while (longitude_degrees < -internal::kLongitudeMaxDegrees) {
    longitude_degrees = longitude_degrees + 360;
  }
  while (longitude_degrees >= internal::kLongitudeMaxDegrees) {
    longitude_degrees = longitude_degrees - 360;
  }
  return longitude_degrees;
}
double normalize_longitude ( double longitude_degrees ) { while ( longitude_degrees < - internal :: kLongitudeMaxDegrees ) { longitude_degrees = longitude_degrees + 360 ; } while ( longitude_degrees >= internal :: kLongitudeMaxDegrees ) { longitude_degrees = longitude_degrees - 360 ; } return longitude_degrees ; }
Normalize a longitude into the range -180 to 180, not including 180.
Normalize a longitude into the range - 180 to 180 not including 180 .