rotate method
Modifies this BitMatrix
to represent the same but rotated the given degrees (0, 90, 180, 270)
Implementation
void rotate(int degrees) {
switch (degrees % 360) {
case 0:
return;
case 90:
rotate90();
return;
case 180:
rotate180();
return;
case 270:
rotate90();
rotate180();
return;
}
throw ArgumentsException(
'degrees must be a multiple of 0, 90, 180, or 270',
);
}