My vectors are declared as follows:
std::vector<double> vec1;
std::vector<double> vec2;
double result = glm::dot(vec1, vec2);
I receive the following error: error: no viable conversion from 'std::__1::vector<double, std::__1::allocator<double> >' to 'double'
Shouldn't glm::dot
return a scalar value (a double
) in this case?
I may be mistaking myself, but this error must come from the argument type, not the return type , glm::dot has never taken any std::vector as argument, and as it's not a vec2 or vec3, etc. (not a glm type), it may try to cast it to a 1 dimension value to perform a 1 dimension scalar product
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With