I'm looking for a function that takes the arguments: (x, y, m, n, rot) where rot%90 always equals 0.
And outputs equivalent coordinates x, y from a matrix of dimensions m, n in the same matrix rotated by rot degrees.
For example, given (x=0, y=0, m=3, n=3, rot=90) it would output [2, 0].
In other words - the top left would move to the top right.
I tried using matrix rotations but these aren't of use here since I'm rotating around the center of an array - at the very least they'd need some manipulation.