public class IntPoint
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
x
Y axis coordinate.
|
int |
y
Y axis coordinate.
|
| Constructor and Description |
|---|
IntPoint()
Initializes a new instance of the IntPoint class.
|
IntPoint(double x,
double y)
Initializes a new instance of the IntPoint class.
|
IntPoint(DoublePoint point)
Initializes a new instance of the IntPoint class.
|
IntPoint(float x,
float y)
Initializes a new instance of the IntPoint class.
|
IntPoint(FloatPoint point)
Initializes a new instance of the IntPoint class.
|
IntPoint(int x,
int y)
Initializes a new instance of the IntPoint class.
|
IntPoint(IntPoint point)
Initializes a new instance of the IntPoint class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Add(int value)
Adds values of two points.
|
void |
Add(IntPoint point)
Adds values of two points.
|
static IntPoint |
Add(IntPoint point1,
IntPoint point2)
Adds values of two points.
|
float |
DistanceTo(IntPoint anotherPoint)
Calculate Euclidean distance between two points.
|
void |
Divide(int value)
Divides values of two points.
|
void |
Divide(IntPoint point)
Divides values of two points.
|
static IntPoint |
Divide(IntPoint point1,
IntPoint point2)
Divides values of two points.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
void |
Multiply(int value)
Multiply values of two points.
|
void |
Multiply(IntPoint point)
Multiply values of two points.
|
static IntPoint |
Multiply(IntPoint point1,
IntPoint point2)
Multiply values of two points.
|
void |
setXY(int x,
int y)
Sets X and Y axis coordinates.
|
void |
Subtract(int value)
Subtract values of two points.
|
void |
Subtract(IntPoint point)
Subtract values of two points.
|
static IntPoint |
Subtract(IntPoint point1,
IntPoint point2)
Subtract values of two points.
|
void |
Swap()
Swap values between the coordinates.
|
DoublePoint |
toDoublePoint()
Convert IntPoint to DoublePoint.
|
FloatPoint |
toFloatPoint()
Convert IntPoint to FloatPoint.
|
java.lang.String |
toString() |
public IntPoint()
public IntPoint(IntPoint point)
point - IntPoint.public IntPoint(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public IntPoint(float x,
float y)
x - X axis coordinate.y - Y axis coordinate.public IntPoint(double x,
double y)
x - X axis coordinate.y - Y axis coordinate.public IntPoint(FloatPoint point)
point - FloatPoint.public IntPoint(DoublePoint point)
point - DoublePoint.public void setXY(int x,
int y)
x - X axis coordinate.y - Y axis coordinate.public void Add(IntPoint point)
point - IntPoint.public static IntPoint Add(IntPoint point1, IntPoint point2)
point1 - IntPoint.point2 - IntPoint.public void Add(int value)
value - Value.public void Subtract(IntPoint point)
point - IntPoint.public static IntPoint Subtract(IntPoint point1, IntPoint point2)
point1 - IntPoint.point2 - IntPoint.public void Subtract(int value)
value - public void Multiply(IntPoint point)
point - IntPoint.public static IntPoint Multiply(IntPoint point1, IntPoint point2)
point1 - IntPoint.point2 - IntPoint.public void Multiply(int value)
value - Value.public void Divide(IntPoint point)
point - IntPoint.public static IntPoint Divide(IntPoint point1, IntPoint point2)
point1 - IntPoint.point2 - IntPoint.public void Divide(int value)
value - Value.public float DistanceTo(IntPoint anotherPoint)
anotherPoint - Point to calculate distance to.public FloatPoint toFloatPoint()
public DoublePoint toDoublePoint()
public void Swap()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object