Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 08:49:00

0001 #ifndef BOOST_QVM_DETAIL_QUAT_ASSIGN_HPP_INCLUDED
0002 #define BOOST_QVM_DETAIL_QUAT_ASSIGN_HPP_INCLUDED
0003 
0004 // Copyright 2008-2024 Emil Dotchevski and Reverge Studios, Inc.
0005 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0006 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 
0008 #include <boost/qvm/config.hpp>
0009 #include <boost/qvm/enable_if.hpp>
0010 #include <boost/qvm/quat_traits.hpp>
0011 
0012 namespace boost { namespace qvm {
0013 
0014 template <class A,class B>
0015 BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
0016 typename enable_if_c<
0017     is_quat<A>::value && is_quat<B>::value,
0018     A &>::type
0019 assign( A & a, B const & b )
0020     {
0021     write_quat_element<0>(a,quat_traits<B>::template read_element<0>(b));
0022     write_quat_element<1>(a,quat_traits<B>::template read_element<1>(b));
0023     write_quat_element<2>(a,quat_traits<B>::template read_element<2>(b));
0024     write_quat_element<3>(a,quat_traits<B>::template read_element<3>(b));
0025     return a;
0026     }
0027 
0028 } }
0029 
0030 #endif