Class Position2D

java.lang.Object
me.hsgamer.hscore.ui.Position2D

public class Position2D extends Object
The 2D position
  • Method Details

    • of

      public static Position2D of(int x, int y)
      Creates a new position
      Parameters:
      x - the x coordinate
      y - the y coordinate
    • maxPosition

      public static Position2D maxPosition(int x1, int y1, int x2, int y2)
      Get the max position
      Parameters:
      x1 - the x of the first position
      y1 - the y of the first position
      x2 - the x of the second position
      y2 - the y of the second position
      Returns:
      the max position
    • maxPosition

      public static Position2D maxPosition(Position2D position1, Position2D position2)
      Get the max position
      Parameters:
      position1 - the first position
      position2 - the second position
      Returns:
      the max position
    • minPosition

      public static Position2D minPosition(int x1, int y1, int x2, int y2)
      Get the min position
      Parameters:
      x1 - the x of the first position
      y1 - the y of the first position
      x2 - the x of the second position
      y2 - the y of the second position
      Returns:
      the min position
    • minPosition

      public static Position2D minPosition(Position2D position1, Position2D position2)
      Get the min position
      Parameters:
      position1 - the first position
      position2 - 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