|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object geometry.LineSegment
public final class LineSegment
This class represents the choice of a line segment in the complex plane. This class is immutable. That is, once a LineSegment is constructed, it will not change.
Constructor Summary | |
---|---|
LineSegment(Complex starting_point,
Complex ending_point)
Construct a new LineSegment from a start and an end. |
|
LineSegment(LineSegment seg,
Similarity sim)
Construct the image of a line segment under a similarity |
Method Summary | |
---|---|
Complex |
endingPoint()
Return the endpoint. |
double |
length()
Return the distance between the starting and ending points. |
Complex |
midpoint()
Return the point midway between the starting and ending points. |
Complex |
startingPoint()
Return the starting point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineSegment(Complex starting_point, Complex ending_point)
starting_point
- the starting point of the segment.ending_point
- the ending point of the segment. segment.public LineSegment(LineSegment seg, Similarity sim)
Method Detail |
---|
public Complex startingPoint()
public Complex endingPoint()
public double length()
public Complex midpoint()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |