Ordinarily you would use clamp(angle,lowangle, highangle), but that wont work as you would have zero in between low and high, and it would go clockwise, rather than what you want.
A work around would be to change the image angle so that what you see is offset by your limits. You should be able to do that in the image editor.
So rather than have clamp(angle, 45,315), you would use clamp(angle,0,90).
Keep in mind that is only for when facing right, you will need another image, and new rules for facing left.
Changing frames of the image should solve that.