Package me.hsgamer.hscore.ui
Class Position2D
java.lang.Object
me.hsgamer.hscore.ui.Position2D
The 2D position
-
Method Summary
Modifier and TypeMethodDescriptionintgetX()Get the x coordinateintgetY()Get the y coordinatestatic Position2DmaxPosition(int x1, int y1, int x2, int y2) Get the max positionstatic Position2DmaxPosition(Position2D position1, Position2D position2) Get the max positionstatic Position2DminPosition(int x1, int y1, int x2, int y2) Get the min positionstatic Position2DminPosition(Position2D position1, Position2D position2) Get the min positionstatic Position2Dof(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
-