To take care of extra translation term, I add a zero over there.

Due to the approximations made by MATLAB, it is hard to get a perfect
zero at the translation in case of rotation at some arbitrary angle. We
will not suffer with this problem in case we rotate at 90, -90 or 180.
Thus, we add one more check condition for translation part. If the
absolute value of translation is less than one, then just make it zero.
The logical reason behind this is that human eye will never notice a
translation of less than one pixel or even one pixel translation. This
is just too small.