Package georegression.metric
Class Distance2D_I32
java.lang.Object
georegression.metric.Distance2D_I32
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
distance
(LineParametric2D_I32 line, Point2D_I32 p) Returns the distance of a point to the closest point on a line.static double
distance
(LineSegment2D_I32 line, Point2D_I32 p) Returns the distance the closest point on a line segment is from the specified point.static double
distanceSq
(LineParametric2D_I32 line, Point2D_I32 p) Returns the squared distance of a point to the closest point on a line.
-
Constructor Details
-
Distance2D_I32
public Distance2D_I32()
-
-
Method Details
-
distance
Returns the distance the closest point on a line segment is from the specified point. The closest point is bounded to be along the line segment.
- Parameters:
line
- A line segment. Not modified.p
- The point. Not modified.- Returns:
- Distance the closest point on the line is away from the point.
-
distance
Returns the distance of a point to the closest point on a line.
- Parameters:
line
- A line. Not modified.p
- The point. Not modified.- Returns:
- Distance the closest point on the line is away from the point.
-
distanceSq
Returns the squared distance of a point to the closest point on a line.
- Parameters:
line
- A line. Not modified.p
- The point. Not modified.- Returns:
- Distance the closest point on the line is away from the point.
-