360-degree sprite direction / rotation algorithm | ScratchStats