]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/test/identity_mat_test.cpp
ef753fb38867be5314795fd89b733e5866ecccee
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 #include <boost/qvm/mat_operations.hpp>
7 #include "test_qvm_matrix.hpp"
15 using namespace boost::qvm
;
16 test_qvm::matrix
<M1
,Dim
,Dim
> m
=identity_mat
<float,Dim
>();
17 for( int i
=0; i
!=Dim
; ++i
)
18 for( int j
=0; j
!=Dim
; ++j
)
19 BOOST_TEST(m
.a
[i
][j
]==float(i
==j
));
20 test_qvm::matrix
<M2
,Dim
,Dim
> n(42,1);
22 for( int i
=0; i
!=Dim
; ++i
)
23 for( int j
=0; j
!=Dim
; ++j
)
24 BOOST_TEST(n
.a
[i
][j
]==float(i
==j
));
35 return boost::report_errors();