Fixed xOffset correction using a different formula.

Because of the difference between the width of the tank's bounding rectangle at default rotation and the width of the tank's bounding rectangle at any diagonal rotation, the error in the xOffset correction could become quite larger as either the rotation becomes more diagonal or the xOffset increases.