[Wolves] rotate 2d array by 45degrees

Stuart Langridge sil at kryogenix.org
Fri Sep 23 10:52:28 BST 2005


> Does anyone have a formula to rotate a 2d array by 45 degrees so you end
> up with an array 142%(?) of the size with the contents of the old array
> rotated.

What? What does "rotate an array" mean? So you take the matrix

(1,2,3
 4,5,6
 7,8,9)

and transform it to be

(0,0,1,0,0
 0,4,0,2,0
 7,0,5,0,3
 0,8,0,6,0
 0,0,9,0,0)

?

Aq.



More information about the Wolves mailing list