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
-
x
- X coordinate of the point.
-
y
- Y coordinate of the point.
-
PointDouble()
- Constructs a point with default settings.
-
PointDouble(double, double)
- Constructs a point.
-
PointDouble(PointDouble)
- Constructs a point by copying another.
-
setLocation(double, double)
- Set the location of the point.
-
setLocation(PointDouble)
- Set the point's location from another point.
-
toString()
- Get a string describing the point.
x
public double x
- X coordinate of the point.
y
public double y
- Y coordinate of the point.
PointDouble
public PointDouble(double x,
double y)
- Constructs a point.
- Parameters:
- x - X coordinate of the point.
- y - Y coordinate of the point.
PointDouble
public PointDouble(PointDouble p)
- Constructs a point by copying another.
- Parameters:
- p - Point to be copied.
PointDouble
public PointDouble()
- Constructs a point with default settings.
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.
setLocation
public void setLocation(PointDouble p)
- Set the point's location from another point.
- Parameters:
- p - Point whose location is to be copied.
toString
public String toString()
- Get a string describing the point.
- Returns:
- A string describing the PointDouble object.
- Overrides:
- toString in class Object