rotate180 method

UBitMatrix rotate180()

Implementation

UBitMatrix rotate180() {
  final UBitMatrix out = UBitMatrix(width, height);
  for (int y = 0; y < height; y++) {
    for (int x = 0; x < width; x++) {
      if (get(x, y)) out.set(width - 1 - x, height - 1 - y);
    }
  }
  return out;
}