Class Position
java.lang.Object
io.github.projectunified.craftux.common.Position
The position
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getX()
Get the x coordinateint
getY()
Get the y coordinateint
hashCode()
static Position
maxPosition
(int x1, int y1, int x2, int y2) Get the max positionstatic Position
maxPosition
(Position position1, Position position2) Get the max positionstatic Position
minPosition
(int x1, int y1, int x2, int y2) Get the min positionstatic Position
minPosition
(Position position1, Position position2) Get the min positionstatic Position
of
(int x, int y) Creates a new position
-
Method Details
-
of
Creates a new position- Parameters:
x
- the x coordinatey
- the y coordinate
-
maxPosition
Get the max position- Parameters:
x1
- the x of the first positiony1
- the y of the first positionx2
- the x of the second positiony2
- the y of the second position- Returns:
- the max position
-
maxPosition
Get the max position- Parameters:
position1
- the first positionposition2
- the second position- Returns:
- the max position
-
minPosition
Get the min position- Parameters:
x1
- the x of the first positiony1
- the y of the first positionx2
- the x of the second positiony2
- the y of the second position- Returns:
- the min position
-
minPosition
Get the min position- Parameters:
position1
- the first positionposition2
- the second position- Returns:
- the min position
-
getX
public int getX()Get the x coordinate- Returns:
- the x coordinate
-
getY
public int getY()Get the y coordinate- Returns:
- the y coordinate
-
equals
-
hashCode
public int hashCode()
-