Yeah it should work with negative angles, but if it doesn't, he is a possible math approach:
if object.angle is less than 0: set object.angle to 360+object.angle%360
else: set object.angle to object.angle%360
I hope this is correct. I can't create negative angles by runtime, it just goes from 0 to 359 when setting self.angle-1
edit: yes works. But wouldn't it be easier to set up the opening of doors like this:
(when door should open):
if door.helper < door.openangle: add 1 to angle; add 1 to door.helper (a instance variable)
(when door should close):
if door.helper > 0: substract 1 from angle, substract 1 from door.helper
The helper variable keeps track of how many big of a swing your door already took and if its maximum swing angle is reached, it stops. same for closed.
Ofc if you want to make it framerate independant you might wanna set it up like this:
if door.helper < door.openangle: set door.helper to clamp(door.helper+60*dt,0,door.openangle)
set angle to door.startangle+door.helper
etc.