### Question:
LatLng implements Parcelable { public double distanceTo(@NonNull LatLng other) { return TurfMeasurement.distance( Point.fromLngLat(longitude, latitude), Point.fromLngLat(other.getLongitude(), other.getLatitude()), UNIT_METRES ); } LatLng(); @Keep  LatLng(double latitude, double longitude);  LatLng(double latitude, double longitude, double altitude);  LatLng(Location location);  LatLng(LatLng latLng); protected  LatLng(Parcel in); void setLatitude(
    @FloatRange(from = GeometryConstants.MIN_LATITUDE, to = GeometryConstants.MAX_LATITUDE) double latitude); double getLatitude(); void setLongitude(@FloatRange(from = GeometryConstants.MIN_LONGITUDE, to = GeometryConstants.MAX_LONGITUDE)
                             double longitude); double getLongitude(); void setAltitude(double altitude); double getAltitude(); @NonNull LatLng wrap(); @Override boolean equals(@Nullable Object object); @Override int hashCode(); @NonNull @Override String toString(); @Override int describeContents(); @Override void writeToParcel(@NonNull Parcel out, int flags); double distanceTo(@NonNull LatLng other); static final Parcelable.Creator<LatLng> CREATOR; }### Answer:
@Test public void testDistanceTo() { LatLng latLng1 = new LatLng(0.0, 0.0); LatLng latLng2 = new LatLng(1.0, 1.0); assertEquals("distances should match", latLng1.distanceTo(latLng2), 157298.7453847275, DELTA); }
@Test public void testDistanceToSamePoint() { LatLng latLng1 = new LatLng(40.71199035644531, -74.0081); LatLng latLng2 = new LatLng(40.71199035644531, -74.0081); double distance = latLng1.distanceTo(latLng2); assertEquals("distance should match", 0.0, distance, DELTA); }
@Test public void testDistanceToClosePointNotNaN() { LatLng latLng = new LatLng(40.00599, -105.29261); LatLng other = new LatLng(40.005990000000025, -105.29260999999997); double distance = latLng.distanceTo(other); assertNotEquals(distance, Double.NaN); }