I have some fonts represented as an array of 8 HEX values, which in turn represent the state of the LEDS in an 8x8 LED array.
Each HEX value is equal to one row in the bit matrix.
For example, [0x41, 0x7F, 0x7F, 0x49, 0x5D, 0x41, 0x63, 0x00] // 'E'
represents the character "E" like so:
0 1 0 0 0 0 0 1
0 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
0 1 0 0 1 0 0 1
0 1 0 1 1 1 0 1
0 1 0 0 0 0 0 1
0 1 1 0 0 0 1 1
0 0 0 0 0 0 0 0
or, more visibly:
█ █
█ █ █ █ █ █ █
█ █ █ █ █ █ █
█ █ █
█ █ █ █ █
█ █
█ █ █ █
What would be the best option (efficiency-wise) to rotate the array clockwise/counter-clockwise, while maintaining the "8 HEX values in an array" format (as the output)?