/// <summary> /// Finds the distance bewteen two points using traditional Euclidean distance. /// </summary> /// <remarks> /// Short and somewhat accurate. /// </remarks> /// /// <param name="point">First point</param> /// <param name="point2">Second point</param> /// <returns>Distance between</returns> public static double Euclidean(Point point, Point point2) { return(Distance.Euclidean(point.X, point.Y, point2.X, point2.Y)); }
/// <summary> /// Finds distance between two points using <see href="https://en.wikipedia.org/wiki/Taxicab_geometry">manhattan distance</see>. /// </summary> /// <remarks> /// Shortest and least accurate. /// </remarks> /// /// <param name="point">First point</param> /// <param name="point2">Second point</param> /// <returns>Distance between</returns> public static double Manhattan(Point point, Point point2) { return(Distance.Manhattan(point.X, point.Y, point2.X, point2.Y)); }
/// <summary> /// Finds the distance bewteen two tiles using traditional Euclidean distance. /// </summary> /// <remarks> /// Short and somewhat accurate. /// </remarks> /// /// <param name="tile">First tile</param> /// <param name="tile2">Second tile</param> /// <returns>Distance between</returns> public static double Euclidean(Tile tile, Tile tile2) { return(Distance.Euclidean(tile.GetTileX(), tile.GetTileY(), tile2.GetTileX(), tile2.GetTileY())); }
/// <summary> /// Finds distance between two tiles using <see href="https://en.wikipedia.org/wiki/Taxicab_geometry">manhattan distance</see>. /// </summary> /// <remarks> /// Shortest and least accurate. /// </remarks> /// /// <param name="tile">First tile</param> /// <param name="tile2">Second tile</param> /// <returns>Distance between</returns> public static double Manhattan(Tile tile, Tile tile2) { return(Distance.Manhattan(tile.GetTileX(), tile.GetTileY(), tile2.GetTileX(), tile2.GetTileY())); }