public class IlvPoint extends Point2D.Double implements Serializable
IlvPoint
class defines a point specified in double
precision representing a location
in (x, y) coordinate space.
This class is a serializable subclass of the Java Point2D.Double
class.
Point2D.Double, Point2D.Float
x, y
Constructor and Description |
---|
IlvPoint()
Creates a new
IlvPoint with coordinates (0, 0). |
IlvPoint(double x,
double y)
Creates a new
IlvPoint with the specified
coordinates. |
IlvPoint(IlvPoint p)
Creates a new
IlvPoint by copying the specified point. |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsOrNear(IlvPoint otherPoint)
Test equality of 2 IlvPoint according default precision
|
void |
floor()
Modifies the point so that the coordinates becomes mathematical integers.
|
void |
move(double x,
double y)
Changes the point location.
|
String |
toString()
Returns a
String that represents the value
of this IlvPoint . |
void |
translate(double dx,
double dy)
Translates the point.
|
int |
xFloor()
Returns the x coordinate of the point as a mathematical integer.
|
int |
yFloor()
Returns the y coordinate of the point as a mathematical integer.
|
getX, getY, setLocation
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
public IlvPoint()
IlvPoint
with coordinates (0, 0).public IlvPoint(double x, double y)
IlvPoint
with the specified
coordinates.x
- the x coordinate.y
- the y coordinate.public IlvPoint(IlvPoint p)
IlvPoint
by copying the specified point.p
- The point to copy.public final void translate(double dx, double dy)
public final void move(double x, double y)
public final void floor()
public final int xFloor()
public final int yFloor()
public String toString()
String
that represents the value
of this IlvPoint
.toString
in class Point2D.Double
IlvPoint
.public boolean equalsOrNear(IlvPoint otherPoint)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.