You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2025/09/22 14:06:35 UTC
(commons-geometry) 06/20: pmd fix: remove unnecessary cast
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git
commit 6bce5eddd7207c69b275c474a4451a766e150247
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Mon Sep 22 14:24:52 2025 +0100
pmd fix: remove unnecessary cast
---
.../java/org/apache/commons/geometry/euclidean/AbstractNSphere.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/AbstractNSphere.java b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/AbstractNSphere.java
index f36fb26c..ce1a6f22 100644
--- a/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/AbstractNSphere.java
+++ b/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/AbstractNSphere.java
@@ -23,7 +23,6 @@ import java.util.Objects;
import java.util.function.ToDoubleBiFunction;
import org.apache.commons.geometry.core.Embedding;
-import org.apache.commons.geometry.core.Point;
import org.apache.commons.geometry.core.Region;
import org.apache.commons.geometry.core.RegionLocation;
import org.apache.commons.geometry.euclidean.oned.Vector1D;
@@ -159,7 +158,7 @@ public abstract class AbstractNSphere<V extends EuclideanVector<V>> implements R
/** {@inheritDoc} */
@Override
public RegionLocation classify(final V pt) {
- final double dist = ((Point<V>) center).distance(pt);
+ final double dist = center.distance(pt);
final int cmp = precision.compare(dist, radius);
if (cmp < 0) {
return RegionLocation.INSIDE;