Array.rotate()
Revision as of 16:05, 4 March 2017 by Joseph (talk | contribs) (Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...")
Array.rotate(NoOfRotations)
Rotate the matrix n times
[1,2,3].rotate(1)
[3, 1, 2]
MAGICSQUARE(3)
| 2 | 7 | 6 |
| 9 | 5 | 1 |
| 4 | 3 | 8 |
MAGICSQUARE(3).rotate(1)
| 9 | 2 | 7 |
| 4 | 5 | 6 |
| 3 | 8 | 1 |
MAGICSQUARE(3).rotate(2)
| 4 | 9 | 2 |
| 3 | 5 | 7 |
| 8 | 1 | 6 |