Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

QVM: Quaternions, Vectors, Matrices


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

This function template is expected to be static member of user-defined specializations of the quat_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.