]>
Commit | Line | Data |
---|---|---|
3a9019d9 FG |
1 | //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.\r |
2 | \r | |
3 | //Distributed under the Boost Software License, Version 1.0. (See accompanying\r | |
4 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r | |
5 | \r | |
6 | #include <boost/qvm/quat_operations.hpp>\r | |
7 | #include "test_qvm_quaternion.hpp"\r | |
8 | #include "gold.hpp"\r | |
9 | \r | |
10 | namespace\r | |
11 | {\r | |
12 | void\r | |
13 | test()\r | |
14 | {\r | |
15 | using namespace boost::qvm::sfinae;\r | |
16 | test_qvm::quaternion<Q1> x(42,2);\r | |
17 | {\r | |
18 | test_qvm::quaternion<Q1> const y(42,1);\r | |
19 | test_qvm::add_v(x.b,x.a,y.a);\r | |
20 | x+=y;\r | |
21 | BOOST_QVM_TEST_EQ(x.a,x.b);\r | |
22 | }\r | |
23 | {\r | |
24 | test_qvm::quaternion<Q2> const y(42,1);\r | |
25 | test_qvm::add_v(x.b,x.a,y.a);\r | |
26 | x+=y;\r | |
27 | BOOST_QVM_TEST_EQ(x.a,x.b);\r | |
28 | }\r | |
29 | }\r | |
30 | }\r | |
31 | \r | |
32 | int\r | |
33 | main()\r | |
34 | {\r | |
35 | test();\r | |
36 | return boost::report_errors();\r | |
37 | }\r |