Question: I have a gameboard grid which is 20 rows high and 10 columns wide with the origin (0,0) being in the top left hand corner.
I have a tetrimino in play, which is composed of four blocks.
I have the x,y location of each block relative to the top left hand corner origin.
I also have the position of the pivot, the point around which I wish to rotate which is relative to the top left hand corner origin.

Each block has an integer position in a gameboard square and thus the pivot has a fractional position inbetween blocks e.g (10.5,10.5)

My question is: Which formula can I use to rotate each block around the pivot?

I have already looked at existing similar questions and answers but could not find an answer that I could get to work.

Help would be much appreciated.

Answer: 
You could rotate all square rings (a-through-h by 2 positions, A-through-P by 4 positions, and so on) around that pivot block:

```

ABCDE    MNOPA
PabcF    LghaB
Oh.dG -> Kf.bC
NgfeH    JedcD
MLKJI    IHGFE

```
Follow the standard 2D rotation formulas in Mathematics should do your trick.

<http://en.wikipedia.org/wiki/Rotation_(mathematics)#Matrix_algebra>