Added rotation angle calculation.
Explicitly defined array size for rotation angle calculation. For Great Justice.
Clarified calc_rotation return value. Made a proper logic loop.
Started implementation doc.