https://github.com/semibran/chebyshev
:straight_ruler: Calculate the Chebyshev distance between two points
https://github.com/semibran/chebyshev
chebyshev distance geometry
Last synced: 8 months ago
JSON representation
:straight_ruler: Calculate the Chebyshev distance between two points
- Host: GitHub
- URL: https://github.com/semibran/chebyshev
- Owner: semibran
- License: mit
- Created: 2017-06-18T04:17:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-28T13:08:23.000Z (almost 4 years ago)
- Last Synced: 2025-10-20T02:12:11.309Z (8 months ago)
- Topics: chebyshev, distance, geometry
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# chebyshev
> Calculate the [Chebyshev distance](https://en.wikipedia.org/wiki/Chebyshev_distance) between two points

This module exposes the function `chebyshev(a, b)`, which determines the Chebyshev distance between points `a` and `b`.
```js
> const distance = require('chebyshev')
> distance([6, 6], [5, 2])
4
```
[](https://www.npmjs.com/package/chebyshev)
## see also
- [`semibran/euclidean`](https://github.com/semibran/euclidean) - calculate Euclidean distance
- [`semibran/manhattan`](https://github.com/semibran/manhattan) - calculate Manhattan distance
- [`semibran/vector`](https://github.com/semibran/vector) - more vector math
- [`hughsk/moore`](https://github.com/hughsk/moore) - find all points within a given Chebyshev distance
## license
[MIT](https://opensource.org/licenses/MIT) © [Brandon Semilla](https://git.io/semibran)