diff options
Diffstat (limited to 'deps')
-rw-r--r-- | deps/geohash-int/geohash_helper.c | 4 | ||||
-rw-r--r-- | deps/geohash-int/geohash_helper.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/deps/geohash-int/geohash_helper.c b/deps/geohash-int/geohash_helper.c index 729f010ea..88a972b47 100644 --- a/deps/geohash-int/geohash_helper.c +++ b/deps/geohash-int/geohash_helper.c @@ -167,7 +167,7 @@ GeoHashFix52Bits geohashAlign52Bits(const GeoHashBits hash) { } /* Calculate distance using haversin great circle distance formula. */ -double distanceEarth(double lon1d, double lat1d, double lon2d, double lat2d) { +double geohashGetDistance(double lon1d, double lat1d, double lon2d, double lat2d) { double lat1r, lon1r, lat2r, lon2r, u, v; lat1r = deg_rad(lat1d); lon1r = deg_rad(lon1d); @@ -182,7 +182,7 @@ double distanceEarth(double lon1d, double lat1d, double lon2d, double lat2d) { int geohashGetDistanceIfInRadius(double x1, double y1, double x2, double y2, double radius, double *distance) { - *distance = distanceEarth(x1, y1, x2, y2); + *distance = geohashGetDistance(x1, y1, x2, y2); if (*distance > radius) return 0; return 1; } diff --git a/deps/geohash-int/geohash_helper.h b/deps/geohash-int/geohash_helper.h index 0e38740de..70c6b2095 100644 --- a/deps/geohash-int/geohash_helper.h +++ b/deps/geohash-int/geohash_helper.h @@ -58,6 +58,8 @@ GeoHashRadius geohashGetAreasByRadiusWGS84(double longitude, double latitude, GeoHashRadius geohashGetAreasByRadiusMercator(double longitude, double latitude, double radius_meters); GeoHashFix52Bits geohashAlign52Bits(const GeoHashBits hash); +double geohashGetDistance(double lon1d, double lat1d, + double lon2d, double lat2d); int geohashGetDistanceIfInRadius(double x1, double y1, double x2, double y2, double radius, double *distance); |