From 8eb3bbaca4201eae121f31c449668ac3d29058ef Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Tue, 2 Oct 2012 20:15:00 +0000 Subject: [PATCH] Remove trailing spaces, added missing javadoc tags. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1393153 13f79535-47bb-0310-9956-ffa450edef68 --- .../math3/geometry/euclidean/twod/Line.java | 8 ++++---- .../math3/geometry/euclidean/twod/Segment.java | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Line.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Line.java index eea06ee7e..f4b7e7849 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Line.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Line.java @@ -264,10 +264,10 @@ public class Line implements Hyperplane, EmbeddingThis is a shortcut for invoking FastMath.abs(getOffset(p)), + * and provides consistency with what is in the + * org.apache.commons.math3.geometry.euclidean.threed.Line class.

+ * * @param p to check * @return distance between the instance and the point */ diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Segment.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Segment.java index 139fe20a9..e67fd65cb 100644 --- a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Segment.java +++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/Segment.java @@ -65,15 +65,19 @@ public class Segment { return line; } - /** - * Calculates the shortest distance from a point to this line segment. + /** Calculates the shortest distance from a point to this line segment. *

- * If the perpendicular extension from the point to the line does not - * cross in the bounds of the line segment, the shortest distance to + * If the perpendicular extension from the point to the line does not + * cross in the bounds of the line segment, the shortest distance to * the two end points will be returned. *

- * - * Algorithm adapted from: http://www.codeguru.com/forum/printthread.php?s=cc8cf0596231f9a7dba4da6e77c29db3&t=194400&pp=15&page=1 + * + * Algorithm adapted from: + * + * Thread @ Codeguru + * + * @param p to check + * @return distance between the instance and the point */ public double distance(final Vector2D p) { final double deltaX = end.getX() - start.getX();