mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix math functions
This commit is contained in:
parent
5d809ef5c9
commit
fa1d769bdf
76 changed files with 582 additions and 169 deletions
|
@ -33,7 +33,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<Outdirected>::value_type
|
||||
>::type
|
||||
calc(Outdirected const& x) const {
|
||||
return (1 + depth_ * sprout::sin(2 * sprout::math::pi<Value>() * rate_ * x.index() / samples_per_sec_)) * *x;
|
||||
return (1 + depth_ * sprout::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_)) * *x;
|
||||
}
|
||||
template<bool Left, typename Outdirected>
|
||||
SPROUT_CONSTEXPR typename std::enable_if<
|
||||
|
@ -41,7 +41,7 @@ namespace sprout {
|
|||
typename std::iterator_traits<Outdirected>::value_type
|
||||
>::type
|
||||
calc(Outdirected const& x) const {
|
||||
return (1 + depth_ * sprout::sin(2 * sprout::math::pi<Value>() * rate_ * x.index() / samples_per_sec_ + sprout::math::pi<Value>())) * *x;
|
||||
return (1 + depth_ * sprout::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_ + sprout::math::pi<Value>())) * *x;
|
||||
}
|
||||
public:
|
||||
SPROUT_CONSTEXPR auto_pan_outdirected_value(
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace sprout {
|
|||
template<typename Outdirected>
|
||||
SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
|
||||
operator()(Outdirected const& x) const {
|
||||
return calc(x, d_ + depth_ * sprout::math::sin(2 * sprout::math::pi<Value>() * rate_ * x.index() / samples_per_sec_));
|
||||
return calc(x, d_ + depth_ * sprout::math::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace sprout {
|
|||
template<typename Outdirected>
|
||||
SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
|
||||
operator()(Outdirected const& x) const {
|
||||
return (1 + depth_ * sprout::math::sin(2 * sprout::math::pi<Value>() * rate_ * x.index() / samples_per_sec_)) * *x;
|
||||
return (1 + depth_ * sprout::math::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_)) * *x;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace sprout {
|
|||
template<typename Outdirected>
|
||||
SPROUT_CONSTEXPR typename std::iterator_traits<Outdirected>::value_type
|
||||
operator()(Outdirected const& x) const {
|
||||
return calc(x, d_ + depth_ * sprout::math::sin(2 * sprout::math::pi<Value>() * rate_ * x.index() / samples_per_sec_));
|
||||
return calc(x, d_ + depth_ * sprout::math::sin(sprout::math::two_pi<Value>() * rate_ * x.index() / samples_per_sec_));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue