Closed HackerWithoutACause closed 3 years ago
For component-wise multiplication, you need to use v1.component_mul(&v2)
.
The *
operator can only be used for multiplications that make sense from a linear algebra point of view. Here you are trying to multiply a 2x1 matrix (which is a 2D vector) to another 2x1 matrix. This is why you are getting a dimension mismatch error.
Thank you.
I have to following code:
when I try to compile it get the error:
I am using rapier3d version
0.1.5
and importing nalgebra from there.