Class Segment
java.lang.Object
org.apache.commons.math3.geometry.euclidean.twod.Segment
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Segment
-
-
Method Details
-
getStart
-
getEnd
-
getLine
-
distance
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 the two end points will be returned.
Algorithm adapted from: Thread @ Codeguru- Parameters:
p- to check- Returns:
- distance between the instance and the point
- Since:
- 3.1
-