geometry
Class LineSegment

java.lang.Object
  extended by geometry.LineSegment

public final class LineSegment
extends Object

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

LineSegment

public LineSegment(Complex starting_point,
                   Complex ending_point)
Construct a new LineSegment from a start and an end.

Parameters:
starting_point - the starting point of the segment.
ending_point - the ending point of the segment. segment.

LineSegment

public LineSegment(LineSegment seg,
                   Similarity sim)
Construct the image of a line segment under a similarity

Method Detail

startingPoint

public Complex startingPoint()
Return the starting point.


endingPoint

public Complex endingPoint()
Return the endpoint.


length

public double length()
Return the distance between the starting and ending points.


midpoint

public Complex midpoint()
Return the point midway between the starting and ending points.



Java Tutorial for Mathematics Students