@@ -208,9 +208,9 @@ public void testPointDist() {
208208 LatLng b = testB [i ];
209209 double expectedRads = Math .toRadians (testDistanceDegrees [i ]);
210210
211- double distRads = h3 .distance (a , b , LengthUnit .rads );
212- double distKm = h3 .distance (a , b , LengthUnit .km );
213- double distM = h3 .distance (a , b , LengthUnit .m );
211+ double distRads = h3 .greatCircleDistance (a , b , LengthUnit .rads );
212+ double distKm = h3 .greatCircleDistance (a , b , LengthUnit .km );
213+ double distM = h3 .greatCircleDistance (a , b , LengthUnit .m );
214214
215215 // TODO: Epsilon is unusually large in the core H3 tests
216216 assertEquals ("radians distance is as expected" , expectedRads , distRads , EPSILON * 10000 );
@@ -228,9 +228,9 @@ public void testPointDist() {
228228 public void testPointDistNaN () {
229229 LatLng zero = new LatLng (0 , 0 );
230230 LatLng nan = new LatLng (Double .NaN , Double .NaN );
231- double dist1 = h3 .distance (nan , zero , LengthUnit .rads );
232- double dist2 = h3 .distance (zero , nan , LengthUnit .km );
233- double dist3 = h3 .distance (nan , nan , LengthUnit .m );
231+ double dist1 = h3 .greatCircleDistance (nan , zero , LengthUnit .rads );
232+ double dist2 = h3 .greatCircleDistance (zero , nan , LengthUnit .km );
233+ double dist3 = h3 .greatCircleDistance (nan , nan , LengthUnit .m );
234234 assertTrue ("nan distance results in nan" , Double .isNaN (dist1 ));
235235 assertTrue ("nan distance results in nan" , Double .isNaN (dist2 ));
236236 assertTrue ("nan distance results in nan" , Double .isNaN (dist3 ));
@@ -240,23 +240,23 @@ public void testPointDistNaN() {
240240 public void testPointDistPositiveInfinity () {
241241 LatLng posInf = new LatLng (Double .POSITIVE_INFINITY , Double .POSITIVE_INFINITY );
242242 LatLng zero = new LatLng (0 , 0 );
243- double dist = h3 .distance (posInf , zero , LengthUnit .m );
243+ double dist = h3 .greatCircleDistance (posInf , zero , LengthUnit .m );
244244 assertTrue ("+Infinity distance results in NaN" , Double .isNaN (dist ));
245245 }
246246
247247 @ Test
248248 public void testPointDistNegativeInfinity () {
249249 LatLng negInf = new LatLng (Double .NEGATIVE_INFINITY , Double .NEGATIVE_INFINITY );
250250 LatLng zero = new LatLng (0 , 0 );
251- double dist = h3 .distance (negInf , zero , LengthUnit .m );
251+ double dist = h3 .greatCircleDistance (negInf , zero , LengthUnit .m );
252252 assertTrue ("-Infinity distance results in NaN" , Double .isNaN (dist ));
253253 }
254254
255255 @ Test (expected = IllegalArgumentException .class )
256256 public void testPointDistInvalid () {
257257 LatLng a = new LatLng (0 , 0 );
258258 LatLng b = new LatLng (0 , 0 );
259- h3 .distance (a , b , null );
259+ h3 .greatCircleDistance (a , b , null );
260260 }
261261
262262 @ Test (expected = IllegalArgumentException .class )
0 commit comments