Interface Point<S extends Space,​P extends Point<S,​P>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double distance​(P p)
      Compute the distance between the instance and another point.
      Space getSpace()
      Get the space to which the point belongs.
      boolean isNaN()
      Returns true if any coordinate of this point is NaN; false otherwise
      P moveTowards​(P other, double ratio)
      Move towards another point.
    • Method Detail

      • getSpace

        Space getSpace()
        Get the space to which the point belongs.
        Returns:
        containing space
      • isNaN

        boolean isNaN()
        Returns true if any coordinate of this point is NaN; false otherwise
        Returns:
        true if any coordinate of this point is NaN; false otherwise
      • distance

        double distance​(P p)
        Compute the distance between the instance and another point.
        Parameters:
        p - second point
        Returns:
        the distance between the instance and p
      • moveTowards

        P moveTowards​(P other,
                      double ratio)
        Move towards another point.

        Motion is linear (along space curvature) and based on a ratio where 0.0 stands for not moving at all, 0.5 stands for moving halfway towards other point, and 1.0 stands for moving fully to the other point.

        Parameters:
        other - other point
        ratio - motion ratio,
        Returns:
        moved point
        Since:
        4.0