bayer function

double bayer(
  1. double x,
  2. double y
)

Ordered-dither threshold of a local pixel (0..1): a > bayer(x, y) draws it.

Implementation

double bayer(double x, double y) =>
    _bayerThresholds[((y.floor() & 3) << 2) | (x.floor() & 3)];