1.0.3 • Published 9 months ago

bayer v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

bayer

npm version stability-stable npm minzipped size dependencies types Conventional Commits styled with prettier linted with eslint license

Compute the bayer matrix for powers of two. Useful for ordered dithering algorithms.

paypal coinbase twitter

npm.io

Installation

npm install bayer

Usage

import bayer from "bayer";

const matrix = bayer();
// => [
//   [0, 2],
//   [3, 1],
// ];

API

bayer(size) ⇒ Array.<Array>

Compute the bayer matrix for powers of two.

Kind: global function Returns: Array.<Array> - A 2D array containing the matrix.

ParamTypeDefaultDescription
sizenumber2Needs to be a power of two otherwise will throw a "Maximum call stack size exceeded" Error.

License

MIT. See license file.

1.0.3

9 months ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.0

8 years ago