dot

Dot product of a and b. Equals the cosine similarity only when both vectors are unit-normalized; use cosineSimilarity when that is not guaranteed.

Throws

if the two vectors have different dimensions.