docs for manhattan distance

This commit is contained in:
Arkadiusz Kondas 2016-04-15 22:32:20 +02:00
parent 100205d767
commit 6f5f190600
2 changed files with 15 additions and 2 deletions

View File

@ -2,8 +2,6 @@
Class for calculation Euclidean distance.
### Euclidean
![euclidean](https://upload.wikimedia.org/math/8/4/9/849f040fd10bb86f7c85eb0bbe3566a4.png "Euclidean Distance")
To calculate distance:

View File

@ -1 +1,16 @@
# Manhattan
Class for calculation Manhattan distance.
![manhattan](https://upload.wikimedia.org/math/4/c/5/4c568bd1d76a6b15e19cb2ac3ad75350.png "Manhattan Distance")
To calculate distance:
```
$a = [4, 6];
$b = [2, 5];
$manhattan = new Manhattan();
$manhattan->distance($a, $b);
// return 3
```