Skip to content

Commit

Permalink
fix(pixel): fix POOL_NEAREST index
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 28, 2021
1 parent d525a48 commit b98d05d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pixel/src/convolve.ts
Expand Up @@ -213,7 +213,7 @@ export const defKernel = (
};

export const POOL_NEAREST: PoolTemplate = (body, w, h) =>
body[(h >> 1) + (w >> 1)];
body[(h >> 1) * w + (w >> 1)];

export const POOL_MEAN: PoolTemplate = (body, w, h) =>
`(${body.join("+")})*${1 / (w * h)}`;
Expand Down

0 comments on commit b98d05d

Please sign in to comment.