You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently store a quaternion in a struct ordered (w, x ,y z).
Occasionally it is helpful to grab a component along axis labeled (1, 2, 3) which have been derived programmatically. This can be done efficiently with a getfield(vec, i) command, but the indices are all off by 1 because the first field is w. We could solve this by swapping the order to (x, y, z, w). This also feels a bit more natural (it is how we order things in projective geometry).
The text was updated successfully, but these errors were encountered:
We currently store a quaternion in a struct ordered (w, x ,y z).
Occasionally it is helpful to grab a component along axis labeled (1, 2, 3) which have been derived programmatically. This can be done efficiently with a getfield(vec, i) command, but the indices are all off by 1 because the first field is w. We could solve this by swapping the order to (x, y, z, w). This also feels a bit more natural (it is how we order things in projective geometry).
The text was updated successfully, but these errors were encountered: