1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef UUID_EF9152E42E4711DFB699737156D89593
7 #define UUID_EF9152E42E4711DFB699737156D89593
9 #include <boost/qvm/deduce_quat.hpp>
10 #include <boost/qvm/assert.hpp>
11 #include "test_qvm.hpp"
16 template <class Tag,class T=float>
24 quaternion( T start=T(0), T step=T(0) )
26 for( int i=0; i!=4; ++i,start+=step )
31 template <class Tag1,class T1,class Tag2,class T2>
33 dump_ab( quaternion<Tag1,T1> const & a, quaternion<Tag2,T2> const & b )
35 detail::dump_ab(a.a,b.a);
45 template <class Tag,class T>
47 quat_traits< test_qvm::quaternion<Tag,T> >
49 typedef T scalar_type;
50 typedef test_qvm::quaternion<Tag,T> this_quaternion_type;
55 write_element( this_quaternion_type & m )
57 BOOST_QVM_STATIC_ASSERT(I>=0);
58 BOOST_QVM_STATIC_ASSERT(I<4);
65 read_element( this_quaternion_type const & m )
67 BOOST_QVM_STATIC_ASSERT(I>=0);
68 BOOST_QVM_STATIC_ASSERT(I<4);
75 write_element_idx( int i, this_quaternion_type & m )
77 BOOST_QVM_ASSERT(i>=0);
78 BOOST_QVM_ASSERT(i<4);
85 read_element_idx( int i, this_quaternion_type const & m )
87 BOOST_QVM_ASSERT(i>=0);
88 BOOST_QVM_ASSERT(i<4);
93 template <class Tag,class T>
95 deduce_quat2<test_qvm::quaternion<Tag,T>,test_qvm::quaternion<Tag,T> >
97 typedef test_qvm::quaternion<Tag,T> type;