Manhattan ruler distance between two cells: the orthogonal-step count, no diagonals.
The counterpart to euclidean and chebyshev for four-way movement and range, where every step is axis-aligned.
euclidean
chebyshev
import { manhattan } from '@datamoc/mwg/core';manhattan({ x: 0, y: 0 }, { x: 3, y: 4 }); // 7 Copy
import { manhattan } from '@datamoc/mwg/core';manhattan({ x: 0, y: 0 }, { x: 3, y: 4 }); // 7
Manhattan ruler distance between two cells: the orthogonal-step count, no diagonals.
The counterpart to
euclideanandchebyshevfor four-way movement and range, where every step is axis-aligned.