 | Vector2IManhattanDistance Method |
Sum of the absolute values of the differences of the components of both vectors.
Namespace: Slash.Math.Algebra.VectorsAssembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntaxpublic static int ManhattanDistance(
Vector2I a,
Vector2I b
)
Public Shared Function ManhattanDistance (
a As Vector2I,
b As Vector2I
) As Integer
public:
static int ManhattanDistance(
Vector2I a,
Vector2I b
)
static member ManhattanDistance :
a : Vector2I *
b : Vector2I -> int
Parameters
- a
- Type: Slash.Math.Algebra.VectorsVector2I
First vector. - b
- Type: Slash.Math.Algebra.VectorsVector2I
Second vector.
Return Value
Type:
Int32|a.X - b.X| + |a.Y - b.Y|
See Also