Calculate the Manhattan distance between two points
This module exposes the function distance(a, b)
, which determines the Manhattan distance between points a
and b
.
> const distance = require('manhattan')
> distance([2, 5], [4, 8])
5
semibran/euclidean
- calculate Euclidean distancesemibran/chebyshev
- calculate Chebyshev distancesemibran/vector
- more vector mathkchapelier/von-neumann
- find all points within a given Manhattan distance