Difference between vmath.dot and vmath.mul_per_elem?

As the title says, I’d like to know if there’s any difference between vmath.dot and vmath.mul_per_elem

It only recently clicked to me that they both act the same (from what I’m aware) and I’d like to know if there’s actually any difference in use case, since I can’t seem to figure it out myself

Thanks in advance `:)

A dot product is the sum of all elements multiplied, e.g.:

d = a.x*b.x + a.y*b.y + a.z*b.z

(d is a scalar)

whereas the per element multiplication gives you a vector, with each element multiplied.

v = (a.x*b.x, a.y*b.y, a.z*b.z)
6 Likes

ohhhh I see now, thanks :sunglasses::+1:

1 Like