div_eq_qs_test.cpp 638 B

12345678910111213141516171819202122232425262728
  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/quat_operations.hpp>
  5. #include "test_qvm_quaternion.hpp"
  6. #include "gold.hpp"
  7. namespace
  8. {
  9. void
  10. test()
  11. {
  12. using namespace boost::qvm::sfinae;
  13. test_qvm::quaternion<Q1> x(42,1);
  14. test_qvm::scalar_multiply_v(x.b,x.a,0.5f);
  15. x/=2;
  16. BOOST_QVM_TEST_EQ(x.a,x.b);
  17. }
  18. }
  19. int
  20. main()
  21. {
  22. test();
  23. return boost::report_errors();
  24. }