1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc. 2 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) 5 6 #include <boost/qvm/quat_operations.hpp> 7 #include "test_qvm_quaternion.hpp" 8 9 namespace 10 { 11 void test()12 test() 13 { 14 using namespace boost::qvm; 15 test_qvm::quaternion<Q1> q=identity_quat<float>(); 16 BOOST_TEST(q.a[0]==1); 17 BOOST_TEST(q.a[1]==0); 18 BOOST_TEST(q.a[2]==0); 19 BOOST_TEST(q.a[3]==0); 20 test_qvm::quaternion<Q2> p(42,1); 21 set_identity(p); 22 BOOST_TEST(p.a[0]==1); 23 BOOST_TEST(p.a[1]==0); 24 BOOST_TEST(p.a[2]==0); 25 BOOST_TEST(p.a[3]==0); 26 } 27 } 28 29 int main()30main() 31 { 32 test(); 33 return boost::report_errors(); 34 } 35