determinant_test.cpp 717 B

1234567891011121314151617181920212223242526272829303132
  1. //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/qvm/mat_operations.hpp>
  5. #include "test_qvm_matrix.hpp"
  6. #include "gold.hpp"
  7. namespace
  8. {
  9. template <int D>
  10. void
  11. test()
  12. {
  13. using namespace boost::qvm::sfinae;
  14. test_qvm::matrix<M1,D,D> const x(42,1);
  15. float gd=test_qvm::determinant(x.b);
  16. float d=determinant(x);
  17. BOOST_QVM_TEST_EQ(gd,d);
  18. }
  19. }
  20. int
  21. main()
  22. {
  23. test<2>();
  24. test<3>();
  25. test<4>();
  26. test<5>();
  27. return boost::report_errors();
  28. }