Snap rotation every X degrees

Hi, right now I have this blueprint that rotates the actor towards my mouse position. But I want it to rotate only when my mouse moves 22.5 degrees from the last rotation angle. Essentially snapping every 22.5 degrees where my mouse is. How would I go about doing this?