(ring, values, value)
| 6537 | } |
| 6538 | |
| 6539 | function smoothLinear(ring, values, value) { |
| 6540 | ring.forEach(function(point) { |
| 6541 | var x = point[0], |
| 6542 | y = point[1], |
| 6543 | xt = x | 0, |
| 6544 | yt = y | 0, |
| 6545 | v1 = valid(values[yt * dx + xt]); |
| 6546 | if (x > 0 && x < dx && xt === x) { |
| 6547 | point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value); |
| 6548 | } |
| 6549 | if (y > 0 && y < dy && yt === y) { |
| 6550 | point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value); |
| 6551 | } |
| 6552 | }); |
| 6553 | } |
| 6554 | |
| 6555 | contours.contour = contour; |
| 6556 |