mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add compost utility
This commit is contained in:
parent
24d2a229f3
commit
b44f7c8f2a
14 changed files with 670 additions and 29 deletions
|
@ -89,7 +89,9 @@ namespace sprout {
|
|||
return phase_;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator*() const {
|
||||
return amplitude_ * sprout::fixed::detail::triangle_value(frequency_ * value_type(index_) + phase_);
|
||||
return amplitude_ == 0 ? 0
|
||||
: amplitude_ * sprout::fixed::detail::triangle_value(frequency_ * value_type(index_) + phase_)
|
||||
;
|
||||
}
|
||||
SPROUT_CONSTEXPR pointer operator->() const {
|
||||
return &operator*()();
|
||||
|
@ -129,7 +131,9 @@ namespace sprout {
|
|||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
||||
return amplitude_ * sprout::fixed::detail::triangle_value(frequency_ * value_type(index_ + n) + phase_);
|
||||
return amplitude_ == 0 ? 0
|
||||
: amplitude_ * sprout::fixed::detail::triangle_value(frequency_ * value_type(index_ + n) + phase_)
|
||||
;
|
||||
}
|
||||
SPROUT_CONSTEXPR triangle_iterator next() const {
|
||||
return triangle_iterator(*this, index_ + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue