Skip to content

Commit

Permalink
Interpolator: overloading the None option. see issue #71
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolek committed Dec 30, 2015
1 parent 3ba2eda commit 6bb5f95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/core/JamomaInterpolator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ namespace Jamoma {
constexpr T operator()(T x0) noexcept {
return x0;
}

constexpr T operator()(T x0, T x1, double delta) noexcept {
T out = delta < 0.5 ? x0 : x1;
return out;
}

constexpr T operator()(T x0, T x1, T x2, T x3, double delta) noexcept {
T out = delta < 0.5 ? x0 : x1;
return out;
}
};


Expand Down

0 comments on commit 6bb5f95

Please sign in to comment.