rotate90 method

UBitMatrix rotate90()

Implementation

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