cosineSimilarity(vecA, vecB) {
    return (
      this.vecDotProduct(vecA, vecB) /
      (this.vecMagnitude(vecA) * this.vecMagnitude(vecB))
    );
  }
Calculates cosine-similarity from two vectors
@param {number[]} left Left vector
@param {number[]} right Right vector
@returns {number} cosine between two vectors
{@link https://en.wikipedia.org/wiki/Cosine_similarity Cosine Similarity}