public class Point
extends java.lang.Object
| Constructor and Description |
|---|
Point(int x,
int y) |
| Modifier and Type | Method and Description |
|---|---|
int |
distanceTo(Point other)
Gets the distance between this point and another.
|
int |
getX() |
int |
getY() |
Point |
offset(int xOff,
int yOff)
Returns a new point offset by xOff and yOff
|
java.lang.String |
toString() |
public int distanceTo(Point other)
other - other pointpublic int getY()
public int getX()
public Point offset(int xOff, int yOff)
xOff - X offset to applyyOff - Y offset to applypublic java.lang.String toString()
toString in class java.lang.Object