public class Point2I
extends java.lang.Object
| Constructor and Description |
|---|
Point2I(int x,
int y) |
| Modifier and Type | Method and Description |
|---|---|
Point2I |
add(int value)
Add the given value to the point.
|
Point2I |
add(int x,
int y)
Add the given values to the point.
|
Point2I |
add(Point2I point)
Add the values of the given point to this point.
|
double |
distance(int x,
int y)
Calculate the distance between this point and the given point.
|
double |
distance(Point2I point)
Calculate the distance between this point and the given point.
|
double |
distanceSquared(int x,
int y)
Calculate the square distance between this point and the given point.
|
double |
distanceSquared(Point2I point)
Calculate the square distance between this point and the given point.
|
Point2I |
divide(int value)
Divide the point by the given value.
|
Point2I |
divide(int x,
int y)
Divide the point by the given values.
|
Point2I |
divide(Point2I point)
Divide this point by the values of the given point.
|
int |
getX() |
int |
getY() |
Point2I |
multiply(int value)
Multiply the point with the given value.
|
Point2I |
multiply(int x,
int y)
Multiply the point with the given values.
|
Point2I |
multiply(Point2I point)
Multiply the values of the given point with this point.
|
Point2I |
subtract(int value)
Subtract the given value from the point.
|
Point2I |
subtract(int x,
int y)
Subtract the given values from the point.
|
Point2I |
subtract(Point2I point)
Subtract the values of the given point from this point.
|
public int getX()
public int getY()
public Point2I add(int value)
value - The value to addpublic Point2I add(int x, int y)
x - The x value to addy - The y value to addpublic Point2I add(Point2I point)
point - The point to addpublic Point2I subtract(int value)
value - The value to subtractpublic Point2I subtract(int x, int y)
x - The x value to subtracty - The y value to subtractpublic Point2I subtract(Point2I point)
point - The point to subtractpublic Point2I multiply(int value)
value - The value to multiplypublic Point2I multiply(int x, int y)
x - The x value to multiplyy - The y value to multiplypublic Point2I multiply(Point2I point)
point - The point to multiplypublic Point2I divide(int value)
value - The value to dividepublic Point2I divide(int x, int y)
x - The x value to dividey - The y value to dividepublic Point2I divide(Point2I point)
point - The point to dividepublic double distanceSquared(int x,
int y)
x - The x coordinate of the pointy - The y coordinate of the pointpublic double distanceSquared(Point2I point)
point - The point to calculate the distance topublic double distance(int x,
int y)
x - The x coordinate of the pointy - The y coordinate of the pointpublic double distance(Point2I point)
point - The point to calculate the distance to