Class Point2D

    • Field Detail

      • x

        protected double x
      • y

        protected double y
    • Constructor Detail

      • Point2D

        public Point2D​(double x,
                       double y)
        Create a new point
        Parameters:
        x - the x coordinate
        y - the y coordinate
    • Method Detail

      • getNumDimensions

        public int getNumDimensions()
        Get the number of dimensions of the point
        Returns:
        the number of dimensions of the point
      • getX

        public double getX()
        Get the x coordinate
        Returns:
        the x coordinate
      • getY

        public double getY()
        Get the y coordinate
        Returns:
        the y coordinate
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • of

        public static Point2D of​(double x,
                                 double y)
        Create a new point
        Parameters:
        x - the x coordinate
        y - the y coordinate
        Returns:
        the point