public class LineSegment
extends java.lang.Object
NOTE: This API is still in flux and might change in incompatible ways in the next release.
Constructor and Description |
---|
LineSegment() |
LineSegment(Point2D p1,
Point2D p2) |
Modifier and Type | Method and Description |
---|---|
double |
distance(Point2D P,
Point2D closestPt)
Finds the distance of a specified point from the line segment and the
closest point on the segment to the specified point.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
public double distance(Point2D P, Point2D closestPt)
P
- Test point.closestPt
- (Return) Closest point on the segment to c.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.