Rotating Array Values

Hey guys, i was wondering if you could rotate array values.
So after rotating the values from this:

1,1,1,1,1,1,1,
0,1,0,0,0,0,0,
0,0,1,0,0,0,0,
0,0,0,1,0,0,0,
0,0,0,0,1,0,0,
0,0,0,0,0,1,0,
0,0,0,0,0,0,1

You get this:

0,0,0,0,0,0,1,
0,0,0,0,0,1,1,
0,0,0,0,1,0,1,
0,0,0,1,0,0,1,
0,0,1,0,0,0,1,
0,1,0,0,0,0,1,
1,0,0,0,0,0,1

Any clever solutions out there?

I don’t recall Unity having any functions for swizzling an array. Traditionally a couple of loops would be used. If your array is square, you can do it in-place easily enough. If it is rectangular, it is generally best to assign a new array. If this is a Tetris block, don’t rotate at all, just store the permutations (which is how proper Tetris does it)

LMSOTFY**

Let Me StackOverflow That For You YLSOB.***

*** You Lazy S.O.B.

Son of a Btch**

Girl dog**
****** a four legged mamal********
******* a animal*********
******** A carbon based life form**********
********* 6 protons 6 nutrons(one carbon 12 atom)

create var for an array member.

var unityRotationArray : Vector3[];

create var for an array.

var unityRotation : Array;

create the array.

function Start()
{
unityRotation = Array(unityRotationArray);
}

then, when you want a rotation value, from the array, you call it you son of a gooch.