mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
replace implementation <cmath> functions to Sprout.Math.Functions
This commit is contained in:
parent
6ccd6e1cf4
commit
6bb2d0fb87
21 changed files with 212 additions and 106 deletions
|
@ -2,7 +2,6 @@
|
|||
#define SPROUT_ITERATOR_SINUSOID_ITERATOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <cmath>
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
@ -11,6 +10,7 @@
|
|||
#include <sprout/iterator/prev.hpp>
|
||||
#include <sprout/iterator/distance.hpp>
|
||||
#include <sprout/math/constants.hpp>
|
||||
#include <sprout/math/sin.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
|
@ -94,7 +94,7 @@ namespace sprout {
|
|||
return phase_;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator*() const {
|
||||
using std::sin;
|
||||
using sprout::sin;
|
||||
return amplitude_ * sin(d_ * value_type(index_) + phase_);
|
||||
}
|
||||
SPROUT_CONSTEXPR pointer operator->() const {
|
||||
|
@ -135,7 +135,7 @@ namespace sprout {
|
|||
return *this;
|
||||
}
|
||||
SPROUT_CONSTEXPR reference operator[](difference_type n) const {
|
||||
using std::sin;
|
||||
using sprout::sin;
|
||||
return amplitude_ * sin(d_ * value_type(index_ + n) + phase_);
|
||||
}
|
||||
SPROUT_CONSTEXPR sinusoid_iterator next() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue