mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add quaternion adapt (hash, tuple)
This commit is contained in:
parent
35bd69d5d3
commit
37eea2c53d
35 changed files with 1941 additions and 974 deletions
60
sprout/math/quaternion/cos.hpp
Normal file
60
sprout/math/quaternion/cos.hpp
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*=============================================================================
|
||||
Copyright (c) 2011-2016 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_COS_HPP
|
||||
#define SPROUT_MATH_QUATERNION_COS_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/math/cos.hpp>
|
||||
#include <sprout/math/sin.hpp>
|
||||
#include <sprout/math/cosh.hpp>
|
||||
//#include <sprout/math/sinhc.hpp>
|
||||
#include <sprout/math/quaternion/quaternion.hpp>
|
||||
#include <sprout/math/quaternion/real.hpp>
|
||||
#include <sprout/math/quaternion/unreal.hpp>
|
||||
#include <sprout/math/quaternion/abs.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace math {
|
||||
//
|
||||
// cos
|
||||
//
|
||||
// !!!
|
||||
// namespace detail {
|
||||
// template<typename T>
|
||||
// inline SPROUT_CONSTEXPR sprout::math::quaternion<T>
|
||||
// cos_impl_1(sprout::math::quaternion<T> const& q, T const& z, T const& w) {
|
||||
// return sprout::math::quaternion<T>(
|
||||
// sprout::math::cos(sprout::math::real(q)) * sprout::math::cosh(z),
|
||||
// w * q.R_component_2(),
|
||||
// w * q.R_component_3(),
|
||||
// w * q.R_component_4()
|
||||
// );
|
||||
// }
|
||||
// template<typename T>
|
||||
// inline SPROUT_CONSTEXPR sprout::math::quaternion<T>
|
||||
// cos_impl(sprout::math::quaternion<T> const& q, T const& z) {
|
||||
// return sprout::math::detail::cos_impl_1(
|
||||
// q, z,
|
||||
// -sprout::math::sin(sprout::math::real(q)) * sprout::math::sinhc_pi(z)
|
||||
// );
|
||||
// }
|
||||
// } // namespace detail
|
||||
// template<typename T>
|
||||
// inline SPROUT_CONSTEXPR sprout::math::quaternion<T>
|
||||
// cos(sprout::math::quaternion<T> const& q) {
|
||||
// return sprout::math::detail::cos_impl(
|
||||
// q,
|
||||
// sprout::math::abs(sprout::math::unreal(q))
|
||||
// );
|
||||
// }
|
||||
} // namespace math
|
||||
|
||||
// using sprout::math::cos;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_MATH_QUATERNION_COS_HPP
|
Loading…
Add table
Add a link
Reference in a new issue