Skip to content

ChessboardDistance

ChessboardDistance(u, v)

returns the chessboard distance (also known as Chebyshev distance) between u and v, which is the number of moves a king on a chessboard needs to get from square u to square v.

See:

Examples

>> ChessboardDistance({-1, -1}, {1, 1})
2

FindClusters, BinaryDistance, BrayCurtisDistance, CanberraDistance, CosineDistance, EuclideanDistance, ManhattanDistance, SquaredEuclideanDistance

Implementation status

  • ✅ - full supported

Github