8 direction aim using stick

So I’ve been trying to code an action platformer and I’m trying to make it so you can aim in 8 directions with the gamepad stick.
Unfortunately the gamepad extension only allows me to code up, down, left, and right directions so I need to figure out how to make it so you can fire diagonally.

the expected result
IMG_3709

You could round the angle: round(Gamepads::StickAngle(1, "Right") / 45) * 45.

Ok, I’ll see if that works