/*============================================================================= 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_LITERALS_HPP #define SPROUT_MATH_QUATERNION_LITERALS_HPP #include #include #include #include #if SPROUT_USE_USER_DEFINED_LITERALS namespace sprout { namespace literals { namespace quaternion { using sprout::literals::complex::operator"" _i; using sprout::literals::complex::operator"" _if; using sprout::literals::complex::operator"" _iF; using sprout::literals::complex::operator"" _il; using sprout::literals::complex::operator"" _iL; // // _j // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _j(long double x) { return sprout::math::quaternion(0, 0, x); } // // _jf // _jF // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _jf(long double x) { return sprout::math::quaternion(0, 0, static_cast(x)); } inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _jF(long double x) { return sprout::math::quaternion(0, 0, static_cast(x)); } // // _jl // _jL // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _jl(long double x) { return sprout::math::quaternion(0, 0, x); } inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _jL(long double x) { return sprout::math::quaternion(0, 0, x); } // // _k // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _k(long double x) { return sprout::math::quaternion(0, 0, 0, x); } // // _kf // _kF // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _kf(long double x) { return sprout::math::quaternion(0, 0, 0, static_cast(x)); } inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _kF(long double x) { return sprout::math::quaternion(0, 0, 0, static_cast(x)); } // // _kl // _kL // inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _kl(long double x) { return sprout::math::quaternion(0, 0, 0, x); } inline SPROUT_CONSTEXPR sprout::math::quaternion operator"" _kL(long double x) { return sprout::math::quaternion(0, 0, 0, x); } } // namespace quaternion using sprout::literals::quaternion::operator"" _j; using sprout::literals::quaternion::operator"" _jf; using sprout::literals::quaternion::operator"" _jF; using sprout::literals::quaternion::operator"" _jl; using sprout::literals::quaternion::operator"" _jL; using sprout::literals::quaternion::operator"" _k; using sprout::literals::quaternion::operator"" _kf; using sprout::literals::quaternion::operator"" _kF; using sprout::literals::quaternion::operator"" _kl; using sprout::literals::quaternion::operator"" _kL; } // namespace literals using sprout::literals::quaternion::operator"" _j; using sprout::literals::quaternion::operator"" _jf; using sprout::literals::quaternion::operator"" _jF; using sprout::literals::quaternion::operator"" _jl; using sprout::literals::quaternion::operator"" _jL; using sprout::literals::quaternion::operator"" _k; using sprout::literals::quaternion::operator"" _kf; using sprout::literals::quaternion::operator"" _kF; using sprout::literals::quaternion::operator"" _kl; using sprout::literals::quaternion::operator"" _kL; } // namespace sprout #endif // #if SPROUT_USE_USER_DEFINED_LITERALS #endif // #ifndef SPROUT_MATH_QUATERNION_LITERALS_HPP