Conversions
The following are in GDScript globalscope and can be called from anywhere
Godot 3.x
rad2deg() # radians to degrees
deg2rad() # degrees to radians
Godot 4.x
rad_to_deg() # radians to degrees
deg_to_rad() # degrees to radians
Rotating a Spatial
# Rotate 45 degrees on the x axis
set_rotation_degrees(Vector3(45, 0, 0))
rotate(Vector3.RIGHT, deg2rad(45))
rotate_x(deg2rad(45))