Class Position
java.lang.Object
io.github.projectunified.craftux.common.Position
The position
-
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetX()Get the x coordinateintgetY()Get the y coordinateinthashCode()static PositionmaxPosition(int x1, int y1, int x2, int y2) Get the max positionstatic PositionmaxPosition(Position position1, Position position2) Get the max positionstatic PositionminPosition(int x1, int y1, int x2, int y2) Get the min positionstatic PositionminPosition(Position position1, Position position2) Get the min positionstatic Positionof(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()
-