36 double tmp = ((rads < 0.0) ? rads +
M_2PI : rads);
136 lng = lng - (2 *
M_PI);
138 while (lng < -
M_PI) {
139 lng = lng + (2 *
M_PI);
190 cos(p1[LAT_INDEX]) * sin(p2[LAT_INDEX]) -
191 sin(p1[LAT_INDEX]) * cos(p2[LAT_INDEX]) * cos(p2[LON_INDEX] - p1[LON_INDEX]));
213 double sinlat, sinlon, coslon;
237 sin(p1[
LAT_INDEX]) * cos(distance) + cos(p1[LAT_INDEX]) * sin(distance) * cos(az);
252 sinlon = sin(az) * sin(distance) / cos(p2[LAT_INDEX]);
253 coslon = (cos(distance) - sin(p1[LAT_INDEX]) * sin(p2[LAT_INDEX])) /
254 cos(p1[LAT_INDEX]) / cos(p2[LAT_INDEX]);
#define GeoCoord(variable_name)
#define EXTENSION_NOINLINE
EXTENSION_INLINE double H3_EXPORT() radsToDegs(double radians)
converts radians to degrees
EXTENSION_INLINE double constrainLng(double lng)
EXTENSION_NOINLINE double _posAngleRads(double rads)
EXTENSION_NOINLINE double radians(const double x)
Geodetic (lat/lon) functions.
EXTENSION_NOINLINE bool _geoAzDistanceRads(const GeoCoord(p1), double az, double distance, GeoCoord(p2))
EXTENSION_NOINLINE double degrees(double x)
EXTENSION_NOINLINE double _geoAzimuthRads(const GeoCoord(p1), const GeoCoord(p2))
EXTENSION_INLINE double H3_EXPORT() degsToRads(double degrees)
converts degrees to radians
#define GeoCoordCopy(dest_coord, src_coord)