Commit 8d91a077 authored by Kuba Wyrostek's avatar Kuba Wyrostek

Do not add interpolated points between points with null values.

parent ca1f2137
...@@ -205,11 +205,14 @@ ____________________________________________________ ...@@ -205,11 +205,14 @@ ____________________________________________________
result.push(points[curX]); result.push(points[curX]);
result.push(points[curY]); result.push(points[curY]);
//add curve point //add curve point; skip between nulls
if (typeof points[curX] === 'number' && typeof points[curY] === 'number'
&& typeof points[curX + ps] === 'number' && typeof points[curY + ps] === 'number') {
for (var x = (xStart += xStep); x < xEnd; x += xStep) { for (var x = (xStart += xStep); x < xEnd; x += xStep) {
result.push(x); result.push(x);
result.push(splines[j](x)); result.push(splines[j](x));
} }
}
j++; j++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment