Boost QVM

q_traits<Q>::w

template <int I> static inline scalar_type & w( Quaternion & q );

This function template is expected to be static member of user-defined specializations of the q_traits template. It returns a mutable reference to the I-th element of q.

Note: For the quaternion a + bi + cj + dk, the elements are assumed to be in the following order: a, b, c, d; that is, I=0/1/2/3 would access a/b/c/d.


See also: q_traits | quat