Dynamics of simple gas–surface interaction. II. Rotationally inelastic collisions at rigid and moving surfaces