MCPcopy Create free account
hub / github.com/breck7/scroll / smoothLinear

Function smoothLinear

external/.d3.js:6539–6553  ·  view source on GitHub ↗
(ring, values, value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

validFunction · 0.85
smooth1Function · 0.85
forEachMethod · 0.80

Tested by

no test coverage detected