Class PointDouble

java.lang.Object
   |
   +----PointDouble

public class PointDouble
extends Object
Utility class for a point with location specified in floating-point.

Version:
$Revision: 1.3 $, $Date: 2000/10/12 14:07:56 $
Author:
John Cavanaugh

Variable Index

 o x
X coordinate of the point.
 o y
Y coordinate of the point.

Constructor Index

 o PointDouble()
Constructs a point with default settings.
 o PointDouble(double, double)
Constructs a point.
 o PointDouble(PointDouble)
Constructs a point by copying another.

Method Index

 o setLocation(double, double)
Set the location of the point.
 o setLocation(PointDouble)
Set the point's location from another point.
 o toString()
Get a string describing the point.

Variables

 o x
 public double x
X coordinate of the point.

 o y
 public double y
Y coordinate of the point.

Constructors

 o PointDouble
 public PointDouble(double x,
                    double y)
Constructs a point.

Parameters:
x - X coordinate of the point.
y - Y coordinate of the point.
 o PointDouble
 public PointDouble(PointDouble p)
Constructs a point by copying another.

Parameters:
p - Point to be copied.
 o PointDouble
 public PointDouble()
Constructs a point with default settings.

Methods

 o setLocation
 public void setLocation(double x,
                         double y)
Set the location of the point.

Parameters:
x - X coordinate of the point.
y - Y coordinate of the point.
 o setLocation
 public void setLocation(PointDouble p)
Set the point's location from another point.

Parameters:
p - Point whose location is to be copied.
 o toString
 public String toString()
Get a string describing the point.

Returns:
A string describing the PointDouble object.
Overrides:
toString in class Object