public class IlvPoint extends Point2D.Float implements Serializable
IlvPoint
class defines a point specified in float
precision representing a location
in (x, y) coordinate space.
This class is a serializable subclass of the Java Point2D.Float
class.
Point2D.Double, Point2D.Float
x, y
Constructor and Description |
---|
IlvPoint()
Creates a new
IlvPoint with coordinates (0, 0). |
IlvPoint(float x,
float 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 |
---|---|
void |
floor()
Modifies the point so that the coordinates becomes mathematical integers.
|
void |
move(float x,
float y)
Changes the point location.
|
String |
toString()
Returns a
String that represents the value
of this IlvPoint . |
void |
translate(float dx,
float 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, setLocation
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
public IlvPoint()
IlvPoint
with coordinates (0, 0).public IlvPoint(float x, float 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(float dx, float dy)
public final void move(float x, float 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.Float
IlvPoint
.© Copyright Rogue Wave Software, Inc. 1997, 2016. All Rights Reserved.