| 15 | string const kShortExtension = ".short"; |
| 16 | |
| 17 | void ToLatLon(double lat, double lon, LatLon & ll) |
| 18 | { |
| 19 | int64_t const lat64 = lat * kValueOrder; |
| 20 | int64_t const lon64 = lon * kValueOrder; |
| 21 | |
| 22 | CHECK(lat64 >= std::numeric_limits<int32_t>::min() && lat64 <= std::numeric_limits<int32_t>::max(), |
| 23 | ("Latitude is out of 32bit boundary:", lat64)); |
| 24 | CHECK(lon64 >= std::numeric_limits<int32_t>::min() && lon64 <= std::numeric_limits<int32_t>::max(), |
| 25 | ("Longitude is out of 32bit boundary:", lon64)); |
| 26 | ll.m_lat = static_cast<int32_t>(lat64); |
| 27 | ll.m_lon = static_cast<int32_t>(lon64); |
| 28 | } |
| 29 | |
| 30 | bool FromLatLon(LatLon const & ll, double & lat, double & lon) |
| 31 | { |
no outgoing calls