Fixed rotation calculation in tile machine.