You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2019/01/15 10:38:26 UTC

[lucene-solr] 07/09: Remove deprecated SloppyMath methods

This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a commit to branch master-deprecations
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 5d4aba7f5a0bf48c762bf4215558bcf75359448e
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Mon Jan 14 18:05:56 2019 +0000

    Remove deprecated SloppyMath methods
---
 .../src/java/org/apache/lucene/util/SloppyMath.java    | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java b/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java
index 44f2c3b..da0ff41 100644
--- a/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java
+++ b/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java
@@ -61,24 +61,6 @@ public class SloppyMath {
   }
   
   /**
-   * Returns the Haversine distance in kilometers between two points
-   * specified in decimal degrees (latitude/longitude).  This works correctly
-   * even if the dateline is between the two points.
-   *
-   * @param lat1 Latitude of the first point.
-   * @param lon1 Longitude of the first point.
-   * @param lat2 Latitude of the second point.
-   * @param lon2 Longitude of the second point.
-   * @return distance in kilometers.
-   * @deprecated Use {@link #haversinMeters(double, double, double, double) instead}
-   */
-  @Deprecated
-  public static double haversinKilometers(double lat1, double lon1, double lat2, double lon2) {
-    double h = haversinSortKey(lat1, lon1, lat2, lon2);
-    return TO_KILOMETERS * 2 * asin(Math.min(1, Math.sqrt(h * 0.5)));
-  }
-  
-  /**
    * Returns a sort key for distance. This is less expensive to compute than 
    * {@link #haversinMeters(double, double, double, double)}, but it always compares the same.
    * This can be converted into an actual distance with {@link #haversinMeters(double)}, which