public class Point extends AbstractPoint implements Serializable
Modifier and Type | Field and Description |
---|---|
int |
x
The x-coordinate of the point.
|
int |
y
The y-coordinate of the point.
|
Constructor and Description |
---|
Point()
Constructs a point at (0, 0).
|
Point(int x,
int y)
Constructs a point at the specified coordinates.
|
Point(IPoint p)
Constructs a point with coordinates equal to the supplied point.
|
Modifier and Type | Method and Description |
---|---|
Point |
addLocal(int dx,
int dy)
Translates this point by the specified offset.
|
void |
move(int x,
int y)
A synonym for
setLocation(pythagoras.i.IPoint) . |
Point |
set(int x,
int y)
Sets the coordinates of this point to the supplied values.
|
Point |
set(IPoint p)
Sets the coordinates of this point to be equal to those of the supplied point.
|
void |
setLocation(int x,
int y)
Sets the coordinates of this point to the supplied values.
|
void |
setLocation(IPoint p)
Sets the coordinates of this point to be equal to those of the supplied point.
|
Point |
subtractLocal(int x,
int y)
Subtracts the supplied x/y from this point.
|
void |
translate(int dx,
int dy)
Translates this point by the specified offset.
|
int |
x()
Returns this point's x-coordinate.
|
int |
y()
Returns this point's y-coordinate.
|
add, add, clone, distance, distance, distanceSq, distanceSq, equals, hashCode, subtract, subtract, subtract, toString
public int x
public int y
public Point()
public Point(int x, int y)
public Point(IPoint p)
public void setLocation(IPoint p)
public void setLocation(int x, int y)
public void move(int x, int y)
setLocation(pythagoras.i.IPoint)
.public void translate(int dx, int dy)
public Point set(IPoint p)
public Point set(int x, int y)
public Point addLocal(int dx, int dy)
public Point subtractLocal(int x, int y)
public int x()
IPoint
Copyright © 2017. All rights reserved.