Skip to content

Commit

Permalink
stack 0 on the active side
Browse files Browse the repository at this point in the history
(alternative/complement to #1967)
  • Loading branch information
Fil committed Jan 3, 2024
1 parent b5366f9 commit 1f44341
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/transforms/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function stack(x, y = one, kx, ky, {offset, order, reverse}, options) {
const y = Y[i];
if (y < 0) yn = Y2[i] = (Y1[i] = yn) + y;
else if (y > 0) yp = Y2[i] = (Y1[i] = yp) + y;
else Y2[i] = Y1[i] = yp; // NaN or zero
else Y2[i] = Y1[i] = yp || yn; // NaN or zero
}
}
facetstacks.push(stacks);
Expand Down
Loading

0 comments on commit 1f44341

Please sign in to comment.