Applying quaternion to rotation