Skip to content

Commit 2c78573

Browse files
authored
Document euclideanDistance.
1 parent 47ee8c9 commit 2c78573

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ calling `$matrix->toArray()[0]` on a `Matrix` instance.
150150
while `dotProduct($otherVector)` will return the sum of the pair-wise products of `$vector` and `$otherVector`,
151151
and is also availabe aliased as `innerProduct($otherVector)`. `outerProduct($otherVector)` will return a new Matrix
152152
representing the outer product of the two vectors. `crossProduct($otherVector)` is also available. Vectors may be
153-
normalized with `normalize()`. They may also be projected onto other vectors with `project($otherVector)`.
153+
normalized with `normalize()`. They may also be projected onto other vectors with `project($otherVector)`. The
154+
Euclidean distance may also be calculated between two vectors with `euclideanDistance($otherVector)`.
154155

155156
For measures of vector magnitude, `l1Norm()`, `l2Norm()`, and `maxNorm()` are all available, with `length()` as
156157
an alias for `l2Norm()`.
@@ -162,7 +163,8 @@ Links to relevant Wikipedia articles are provided in the function documentation
162163

163164
- 3.0.0
164165
- Update to PHP 8 to start taking advantage of new features.
165-
- Adds som previously-missing type assertions enabled by PHP 8.
166+
- Adds some previously-missing type assertions enabled by PHP 8.
167+
- Adds `euclideanDistance` to `Vector`.
166168

167169
- 2.2.0
168170
- Implement the `ArrayAccess` interface on `Matrix` to return row vectors.

0 commit comments

Comments
 (0)