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
This commit is contained in:
parent
3b5d0dd52c
commit
8eb3bbaca4
|
@ -264,9 +264,9 @@ public class Line implements Hyperplane<Euclidean2D>, Embedding<Euclidean2D, Euc
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Compute the distance between the instance and a point.
|
/** Compute the distance between the instance and a point.
|
||||||
* This is a shortcut for invoking FastMath.abs(getOffset(p)),
|
* <p>This is a shortcut for invoking FastMath.abs(getOffset(p)),
|
||||||
* and provides consistency with what is in the
|
* and provides consistency with what is in the
|
||||||
* org.apache.commons.math3.geometry.euclidean.threed.Line class.
|
* org.apache.commons.math3.geometry.euclidean.threed.Line class.</p>
|
||||||
*
|
*
|
||||||
* @param p to check
|
* @param p to check
|
||||||
* @return distance between the instance and the point
|
* @return distance between the instance and the point
|
||||||
|
|
|
@ -65,15 +65,19 @@ public class Segment {
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Calculates the shortest distance from a point to this line segment.
|
||||||
* Calculates the shortest distance from a point to this line segment.
|
|
||||||
* <p>
|
* <p>
|
||||||
* If the perpendicular extension from the point to the line does not
|
* If the perpendicular extension from the point to the line does not
|
||||||
* cross in the bounds of the line segment, the shortest distance to
|
* cross in the bounds of the line segment, the shortest distance to
|
||||||
* the two end points will be returned.
|
* the two end points will be returned.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* Algorithm adapted from: http://www.codeguru.com/forum/printthread.php?s=cc8cf0596231f9a7dba4da6e77c29db3&t=194400&pp=15&page=1
|
* Algorithm adapted from:
|
||||||
|
* <a href="http://www.codeguru.com/forum/printthread.php?s=cc8cf0596231f9a7dba4da6e77c29db3&t=194400&pp=15&page=1">
|
||||||
|
* Thread @ Codeguru</a>
|
||||||
|
*
|
||||||
|
* @param p to check
|
||||||
|
* @return distance between the instance and the point
|
||||||
*/
|
*/
|
||||||
public double distance(final Vector2D p) {
|
public double distance(final Vector2D p) {
|
||||||
final double deltaX = end.getX() - start.getX();
|
final double deltaX = end.getX() - start.getX();
|
||||||
|
|
Loading…
Reference in New Issue