Skip to content

Adding the quaternion-vector product as a utility function #250

@roshambo919

Description

@roshambo919

Is your feature request related to a problem? Please describe.
Many folks want to rotate vectors using quaternions. As mentioned in the docs,rotate_vectors does this but is not the most efficient way to rotate a single vector because it employs matrix multiplication. As noted in the docs, the formula

v' = v + 2 * r x (s * v + r x v) / m

should suffice. This is mentioned in a couple issues as well (e.g., #151).

Describe the solution you'd like
Can we add this as a utility function? Of course, it's easy for end-users to implement themselves, but I think this is common enough that it would enhance adoption.

Additional context
I can put in a PR and unit tests, should it be a worthwhile contribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions