mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix sinusoidal_iterator
This commit is contained in:
parent
51a7a4c86c
commit
374374c62b
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
SPROUT_CONSTEXPR reference operator*() const {
|
SPROUT_CONSTEXPR reference operator*() const {
|
||||||
using std::sin;
|
using std::sin;
|
||||||
return amplitude_ * sin(d_ * value_type(index_));
|
return amplitude_ * sin(d_ * value_type(index_) + phase_);
|
||||||
}
|
}
|
||||||
SPROUT_CONSTEXPR pointer operator->() const {
|
SPROUT_CONSTEXPR pointer operator->() const {
|
||||||
return &operator*()();
|
return &operator*()();
|
||||||
|
@ -136,7 +136,7 @@ namespace sprout {
|
||||||
}
|
}
|
||||||
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
||||||
using std::sin;
|
using std::sin;
|
||||||
return amplitude_ * sin(d_ * value_type(index_ + n));
|
return amplitude_ * sin(d_ * value_type(index_ + n) + phase_);
|
||||||
}
|
}
|
||||||
SPROUT_CONSTEXPR sinusoid_iterator next() const {
|
SPROUT_CONSTEXPR sinusoid_iterator next() const {
|
||||||
return sinusoid_iterator(*this, index_ + 1);
|
return sinusoid_iterator(*this, index_ + 1);
|
||||||
|
|
Loading…
Reference in a new issue