# 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 | quat_traits_defaults