/** * Calculates the distance on the xy-plane bewteen two 3D points. * <p> * WARNING: the 3D arguments are projected onto the XY-plane to perform the actual computation in 2D. * </p> * * @param firstPoint the first point. Not modified. * @param secondPoint the second point. Not modified. * @return the distance between the two points. */ public static double getXYDistance(Point3d firstPoint, Point3d secondPoint) { return distanceBetweenPoints(firstPoint.getX(), firstPoint.getY(), secondPoint.getX(), secondPoint.getY()); }
double y = pointOne.getY() + alpha * vy1; double distance = GeometryTools.distanceBetweenPoints(point.x, point.y, x, y); if (distance < closestDistance)