/// <summary>
 /// Calculate the Chebyshev distance between two <see cref="Vector2"/> instances.
 /// </summary>
 /// <param name="a">The first instance.</param>
 /// <param name="b">The second instance.</param>
 /// <returns>The Manhattan Distance between two instances.</returns>
 public static float GetChebyshevDistance(this Vector2 a, Vector2 b)
 {
     return(DistanceHelper.GetChebyshevDistance(a.X, a.Y, b.X, b.Y));
 }
 /// <summary>
 /// Calculate the Manhattan distance between two <see cref="Vector2"/> instances.
 /// </summary>
 /// <param name="a">The first instance.</param>
 /// <param name="b">The second instance.</param>
 /// <returns>The Manhattan Distance between two instances.</returns>
 public static float GetManhattanDistance(this Vector2 a, Vector2 b)
 {
     return(DistanceHelper.GetManhattanDistance(a.X, a.Y, b.X, b.Y));
 }
Example #3
0
 /// <summary>
 /// Calculate the Chebyshev distance between two <see cref="PointF"/> instances.
 /// </summary>
 /// <param name="a">The first instance.</param>
 /// <param name="b">The second instance.</param>
 /// <returns>The Manhattan Distance between two instances.</returns>
 public static float GetChebyshevDistance(this PointF a, PointF b)
 {
     return(DistanceHelper.GetChebyshevDistance(a.X, a.Y, b.X, b.Y));
 }
Example #4
0
 /// <summary>
 /// Calculate the Euclidean distance between two <see cref="PointF"/> instances.
 /// </summary>
 /// <param name="a">The first instance.</param>
 /// <param name="b">The second instance.</param>
 /// <returns>The Manhattan Distance between two instances.</returns>
 public static double GetEuclideanDistance(this PointF a, PointF b)
 {
     return(DistanceHelper.GetEuclideanDistance(a.X, a.Y, b.X, b.Y));
 }
Example #5
0
 /// <summary>
 /// Calculate the Manhattan distance between two <see cref="PointF"/> instances.
 /// </summary>
 /// <param name="a">The first instance.</param>
 /// <param name="b">The second instance.</param>
 /// <returns>The Manhattan Distance between two instances.</returns>
 public static float GetManhattanDistance(this PointF a, PointF b)
 {
     return(DistanceHelper.GetManhattanDistance(a.X, a.Y, b.X, b.Y));
 }