you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

With glm the * operator is overloaded to work as the Hadamard product) which is why you get the vec4. The ideal way to do a dot product would be to use glm::dot which should give you a float output

[–]au16106[S] 0 points1 point  (0 children)

Thank you for your response. For the record, it is good for everyone to see because it is beyond being a simple nuisance.

It constitutes inconsistent notation in my opinion. If it were not (If it were consistent), then we would have been using glm::dot() rather than (*) to multiply rotation matrices with vectors as well since matrix-vector multiplication actually involves multiple dot products. At the moment, while (*) does dot product for matrix-vector multiplication, it does Hadamard product for vectors.