Boost C++ Libraries

...one 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

quat_traits<Q>::read_element

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

This function template is expected to be static member of user-defined specializations of the quat_traits template. It returns the I-th element of q, by value or by const reference.

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: quat | quat_traits