From 50b89471aa2fbc0e56029695421355a1afcdf80e Mon Sep 17 00:00:00 2001 From: Tara Drwenski Date: Fri, 3 May 2024 09:47:11 -0500 Subject: [PATCH] Fix typo is distance computation --- tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java index d90999deb6..6b8d97df23 100644 --- a/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java +++ b/tds-ugrid/src/main/java/ucar/nc2/dt/ugrid/geom/Point3D.java @@ -348,7 +348,7 @@ public void setLocation(Point3D p) { public static double distanceSq(double x1, double y1, double z1, double x2, double y2, double z2) { x1 -= x2; y1 -= y2; - z2 -= z2; + z1 -= z2; return (x1 * x1 + y1 * y1 + z1 * z1); }