cosineSimilarity
Calculates the cosine similarity between this vector and another vector. The result is a value between -1 and 1, where 1 means the vectors are identical, 0 means they are orthogonal, and -1 means they are completely opposite.
Return
The cosine similarity between the two vectors.
Parameters
other
The other vector to compare with.
Throws
if the vectors have different dimensions.