Class Distance


  • public final class Distance
    extends java.lang.Object
    • Method Detail

      • to

        public static double to​(Locatable destination)
      • to

        public static double to​(Locatable destination,
                                java.util.Map<java.lang.String,​java.lang.Object> cache)
      • to

        public static double to​(Locatable destination,
                                Distance.Algorithm algorithm,
                                java.util.Map<java.lang.String,​java.lang.Object> cache)
        Calculates the distance between the local player and the destination using the specified algorithm.
        Returns:
        The calculated value or -1
      • between

        public static double between​(Locatable start,
                                     Locatable destination,
                                     java.util.Map<java.lang.String,​java.lang.Object> cache)
      • between

        public static double between​(Locatable start,
                                     Locatable destination,
                                     Distance.Algorithm algorithm)
        Calculates the distance between the start and destination using the specified algorithm.
        Returns:
        The calculated value or Double.POSITIVE_INFINITY if the Locatables are on the same plane.
      • between

        public static double between​(Locatable start,
                                     Locatable destination,
                                     Distance.Algorithm algorithm,
                                     java.util.Map<java.lang.String,​java.lang.Object> cache)
        Calculates the distance between the start and destination center coordinates using the specified algorithm.
        Returns:
        The calculated value or Double.POSITIVE_INFINITY if the Locatables are on the same plane.
      • between

        public static double between​(Coordinate start,
                                     Coordinate destination,
                                     Distance.Algorithm algorithm)
        Calculates the distance between the start and destination using the specified algorithm.
        Returns:
        The calculated value or Double.POSITIVE_INFINITY if the Locatables are on the same plane.