You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2020/02/21 16:40:31 UTC

[lucene-solr] branch branch_8x updated: LUCENE-9238: Do not use Math#toRadians() in branch_8x

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

ivera 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 799ab23  LUCENE-9238: Do not use Math#toRadians() in branch_8x
799ab23 is described below

commit 799ab23bc512efe2d6338bb3c547d232eb096569
Author: iverase <iv...@apache.org>
AuthorDate: Fri Feb 21 17:40:03 2020 +0100

    LUCENE-9238: Do not use Math#toRadians() in branch_8x
---
 .../test-framework/src/java/org/apache/lucene/geo/ShapeTestUtil.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/geo/ShapeTestUtil.java b/lucene/test-framework/src/java/org/apache/lucene/geo/ShapeTestUtil.java
index 47cd3bd..ddb3acb 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/geo/ShapeTestUtil.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/geo/ShapeTestUtil.java
@@ -155,8 +155,8 @@ public class ShapeTestUtil {
 
         len = StrictMath.min(len, StrictMath.min(maxX, maxY));
 
-        float x = (float)(centerX + len * Math.cos(Math.toRadians(angle)));
-        float y = (float)(centerY + len * Math.sin(Math.toRadians(angle)));
+        float x = (float)(centerX + len * Math.cos(StrictMath.toRadians(angle)));
+        float y = (float)(centerY + len * Math.sin(StrictMath.toRadians(angle)));
 
         xList.add(x);
         yList.add(y);