]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/qvm/test/identity_quat_test.cpp
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / boost / libs / qvm / test / identity_quat_test.cpp
CommitLineData
1e59de90 1// Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc.
92f5a8d4 2
1e59de90
TL
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#ifdef BOOST_QVM_TEST_SINGLE_HEADER
7# include BOOST_QVM_TEST_SINGLE_HEADER
8#else
9# include <boost/qvm/quat_operations.hpp>
10#endif
92f5a8d4 11
92f5a8d4
TL
12#include "test_qvm_quaternion.hpp"
13
14namespace
15 {
16 void
17 test()
18 {
19 using namespace boost::qvm;
20 test_qvm::quaternion<Q1> q=identity_quat<float>();
21 BOOST_TEST(q.a[0]==1);
22 BOOST_TEST(q.a[1]==0);
23 BOOST_TEST(q.a[2]==0);
24 BOOST_TEST(q.a[3]==0);
25 test_qvm::quaternion<Q2> p(42,1);
26 set_identity(p);
27 BOOST_TEST(p.a[0]==1);
28 BOOST_TEST(p.a[1]==0);
29 BOOST_TEST(p.a[2]==0);
30 BOOST_TEST(p.a[3]==0);
31 }
32 }
33
34int
35main()
36 {
37 test();
38 return boost::report_errors();
39 }