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
150150 }
151151 }
152152
153−double LinearInterpolate(double y0, double y1, double mu)
153+/*double LinearInterpolate(double y0, double y1, double mu)
154154 {
155155 return y1 + mu*(y1-y0);
156+}*/
157+
158+double LinearInterpolate(double y1, double y2, double mu)
159+{
160+ return(y1*(1-mu)+y2*mu);
156161 }
157162
158163 double 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