Rotate a 2D matrix in 90 degree steps.

rotate2D(slice, degrees = 90)

Arguments

slice

a 2D matrix

degrees

integer, must be a (positive or negative) multiple of 90

Value

2D matrix, the rotated matrix