lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject [lucene-solr] branch branch_8x updated: LUCENE-9029: Deprecate SloppyMath toRadians/toDegrees in favor of Java Math
Date Thu, 14 Nov 2019 08:02:48 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch_8x by this push:
     new d62a2dd  LUCENE-9029: Deprecate SloppyMath toRadians/toDegrees in favor of Java Math
d62a2dd is described below

commit d62a2dd67e6f45a4b50063d095af6b82f64ec46e
Author: Adrien Grand <jpountz@gmail.com>
AuthorDate: Thu Nov 14 09:02:26 2019 +0100

    LUCENE-9029: Deprecate SloppyMath toRadians/toDegrees in favor of Java Math
---
 lucene/CHANGES.txt                                          | 5 +++--
 lucene/core/src/java/org/apache/lucene/util/SloppyMath.java | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 6a777a7..b001e1b 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -6,8 +6,9 @@ http://s.apache.org/luceneversions
 ======================= Lucene 8.4.0 =======================
 
 API Changes
----------------------
-(No changes)
+
+* LUCENE-9029: Deprecate SloppyMath toRadians/toDegrees in favor of Java Math.
+  (Jack Conradson via Adrien Grand)
 
 New Features
 ---------------------
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..74c4254 100644
--- a/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java
+++ b/lucene/core/src/java/org/apache/lucene/util/SloppyMath.java
@@ -180,7 +180,9 @@ public class SloppyMath {
    * Convert to degrees.
    * @param radians radians to convert to degrees
    * @return degrees
+   * @deprecated Use {@link Math#toDegrees(double)} on Java 9+.
    */
+  @Deprecated
   public static double toDegrees(final double radians) {
     return radians * TO_DEGREES;
   }
@@ -189,7 +191,9 @@ public class SloppyMath {
    * Convert to radians.
    * @param degrees degrees to convert to radians
    * @return radians
+   * @deprecated Use {@link Math#toRadians(double)} on Java 9+.
    */
+  @Deprecated
   public static double toRadians(final double degrees) {
     return degrees * TO_RADIANS;
   }


Mime
View raw message