set method

void set(
  1. int x,
  2. int y
)

Sets the given bit to true.

@param x The horizontal component (i.e. which column) @param y The vertical component (i.e. which row)

Implementation

void set(int x, int y) {
  final offset = y * _rowSize + (x ~/ 32);
  _bits[offset] |= (1 << (x & 0x1f) & 0xFFFFFFFF);
}