Class Point


  • public final class Point
    extends Object
    A two-dimensional coordinate on the canvas.
    • Constructor Detail

      • Point

        public Point​(int x,
                     int y)
    • Method Detail

      • distanceTo

        public int distanceTo​(Point other)
        Gets the distance between this point and another.
        Parameters:
        other - other point
        Returns:
        the distance
      • getX

        public int getX()
      • getY

        public int getY()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object