Closed evbernardes closed 2 years ago
Thanks for the suggestion. However, I don't want to make matmul
a synonym for rotation, because multiplication of matrices with quaternion elements is actually a thing, and I wouldn't want to deceive people into thinking they can multiply quaternion matrices. It's important to remember that people (myself included) do use quaternions for things other than just rotations — though rotations are certainly the most common application.
As for having a simpler syntax, you can just use v2 = q.rotate(v1)
, which seems a lot clearer IMO. However, I realize that I didn't put that in the README, which is an oversight I've fixed now.
Fair enough, and yeah somehow I didn't think of looking for a "rotate" function! Thanks for your reply, and most of all, thanks for this awesome library!
Since matmul for quaternion type arrays isn't implemented, it would be nice to have it implemented as rotation of a vector. Example: If I have an array of size (N x 3) or just even (1 x 3) representing a 3D vector and an array (N x 4) representing the quaternion, instead of having to type:
v2 = (q * quaternionic.array.from_vector_part(v1) * q.inverse).vector
It would be nice to just type instead:v2 = q @ v1