From 374374c62bd6882996bd2c46b5143fd63d0a4b1e Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 1 May 2012 11:37:52 +0900 Subject: [PATCH] fix sinusoidal_iterator --- sprout/iterator/sinusoid_iterator.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sprout/iterator/sinusoid_iterator.hpp b/sprout/iterator/sinusoid_iterator.hpp index 40fe8b6e..e73a3bb7 100644 --- a/sprout/iterator/sinusoid_iterator.hpp +++ b/sprout/iterator/sinusoid_iterator.hpp @@ -95,7 +95,7 @@ namespace sprout { } SPROUT_CONSTEXPR reference operator*() const { using std::sin; - return amplitude_ * sin(d_ * value_type(index_)); + return amplitude_ * sin(d_ * value_type(index_) + phase_); } SPROUT_CONSTEXPR pointer operator->() const { return &operator*()(); @@ -136,7 +136,7 @@ namespace sprout { } SPROUT_CONSTEXPR reference operator[](difference_type n) const { 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 { return sinusoid_iterator(*this, index_ + 1);