I'm learning 2D gamedev and godot. I started creating an Ikari Warriors clone and I have code that rotates my player by 45 degrees in 8 directions. I like the effect and I don't want to make it smooth. However, I'm wondering if there is a shortcut way of doing the following:

```
if (input_vector.x == 0 && input_vector.y < 0): # up
set_rotation_degrees(0)
elif (input_vector.x > 0 && input_vector.y < 0): # up-right
set_rotation_degrees(45)
elif (input_vector.x > 0 && input_vector.y == 0): # right
set_rotation_degrees(90)
elif (input_vector.x > 0 && input_vector.y > 0): # down-right
set_rotation_degrees(135)
elif (input_vector.x == 0 && input_vector.y > 0): # down
set_rotation_degrees(180)
elif (input_vector.x < 0 && input_vector.y > 0): # down-left
set_rotation_degrees(225)
elif (input_vector.x < 0 && input_vector.y == 0): # left
set_rotation_degrees(270)
elif (input_vector.x < 0 && input_vector.y < 0): # up-left
set_rotation_degrees(315)
```