Interface Point

All Known Implementing Classes:
Point2

public interface Point
Simple interface defining a point.

Warning: This may change in the future (by being extended), so developers are advised not to subclass it...

Author:
Pete Bankhead
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    dim()
    Number of values used to represent this point.
    double
    Calculate the distance to another point, with the same dim().
    double
    Calculate the squared distance to another point, with the same dim().
    double
    get(int dim)
    Get the value of the ordinate for the specified dimension.
  • Method Details

    • dim

      int dim()
      Number of values used to represent this point.

      For an x,y coordinate pair this should return 2.

      Returns:
    • get

      double get(int dim)
      Get the value of the ordinate for the specified dimension.
      Parameters:
      dim -
      Returns:
    • distanceSq

      double distanceSq(Point p)
      Calculate the squared distance to another point, with the same dim().
      Parameters:
      p -
      Returns:
      See Also:
    • distance

      double distance(Point p)
      Calculate the distance to another point, with the same dim().
      Parameters:
      p -
      Returns:
      See Also: