/*============================================================================= Copyright (c) 2011-2017 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP #define SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP #include #include namespace sprout { namespace math { namespace detail { template SPROUT_CONSTEXPR sprout::array mul(sprout::array const& l, T const& r) { return sprout::array{{ l[0] * r, l[1] * r, }}; } template SPROUT_CONSTEXPR sprout::array mul(sprout::array const& l, sprout::array const& r) { return sprout::array{{ l[0] * r[0], l[1] * r[1], }}; } template SPROUT_CONSTEXPR sprout::array mul(sprout::array const& l, T const& r) { return sprout::array{{ l[0] * r, l[1] * r, l[2] * r, l[3] * r }}; } template SPROUT_CONSTEXPR sprout::array mul(sprout::array const& l, sprout::array const& r) { return sprout::array{{ l[0] * r[0], l[1] * r[1], l[2] * r[2], l[3] * r[3] }}; } } // namespace detail } // namespace math } // namespace sprout #endif // #ifndef SPROUT_MATH_QUATERNION_DETAIL_MUL_HPP