History

fixed errors in Linear Interpolation

Joel Matthys committed 10 years ago

Commit 7200e221 parent d8ce37c1 file · +6 −1Browse files

Showing the changes to Wavetable/Wavetable.cpp (1 of 1 file). Show all

Unified · Split

Wavetable/Wavetable.cpp+6−1
@@ -150,9 +150,14 @@ void make_default_table() · 149 unmodified lines
150 }150 }
151}151}
152 152
153double LinearInterpolate(double y0, double y1, double mu)153/*double LinearInterpolate(double y0, double y1, double mu)
154{154{
155 return y1 + mu*(y1-y0);155 return y1 + mu*(y1-y0);
156}*/
157
158double LinearInterpolate(double y1, double y2, double mu)
159{
160 return(y1*(1-mu)+y2*mu);
156}161}
157 162
158double CubicInterpolate(double y0, double y1, double y2, double y3, double mu)163double CubicInterpolate(double y0, double y1, double y2, double y3, double mu)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t