We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa1e1ae commit d22c036Copy full SHA for d22c036
Maths/EuclideanDistance.js
@@ -1,4 +1,10 @@
1
-// Wikipedia: https://en.wikipedia.org/wiki/Euclidean_distance
+/**
2
+ * Wikipedia: https://en.wikipedia.org/wiki/Euclidean_distance
3
+ * Calculate the Euclidean distance between two vectors.
4
+ * @param {number[]} vector1 - The first vector.
5
+ * @param {number[]} vector2 - The second vector.
6
+ * @returns {number} The Euclidean distance between the two vectors.
7
+ */
8
9
const EuclideanDistance = (vector1, vector2) => {
10
let sumOfSquares = 0
0 commit comments