get method

bool get(
  1. int x,
  2. int y
)

Gets the requested bit, where true means black.

@param x The horizontal component (i.e. which column) @param y The vertical component (i.e. which row) @return value of given bit in matrix

Implementation

bool get(int x, int y) {
  final offset = y * _rowSize + (x ~/ 32);
  return ((_bits[offset] >>> (x & 0x1f)) & 1) != 0;
}