AROTATE
Reference
Section titled “Reference”>> Reference, Discussion, & Example Applications:
Rotates an array.
Calls AFLIP.
Inputs:
Section titled “Inputs:”- a : the array
- [r] : rotate argument: -1, 90º to the “left”(CCW) once; 1, 90º to the “right”(CW) once; 2, 180º (2 times 90º CCW or CW)
AROTATE = LAMBDA(a, r, SWITCH(r, -1, AFLIP(TRANSPOSE(a), 1), 1, AFLIP(TRANSPOSE(a)), 2, AFLIP(a, 2)));