mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-02 06:52:19 +00:00
Don't reset i
This commit is contained in:
parent
09c0673759
commit
7156488f3e
1 changed files with 1 additions and 1 deletions
|
|
@ -7,8 +7,8 @@ export default function spline(xs, ys) {
|
|||
ks = getNaturalKs(xs, ys, ks);
|
||||
const maxX = xs[xs.length - 1];
|
||||
const allYs = [];
|
||||
let i = 1;
|
||||
for (let x = 0; x <= maxX; x++) {
|
||||
let i = 1;
|
||||
while (xs[i] < x) i++;
|
||||
const t = (x - xs[i - 1]) / (xs[i] - xs[i - 1]);
|
||||
const a = ks[i - 1] * (xs[i] - xs[i - 1]) - (ys[i] - ys[i - 1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue