How do I limit an object to rotate back and forth between 2 angles?

Right now, this script allows me to rotate an object clockwise or counterclockwise by holding the “E” or “R” keys. How would I limit the rotation so the object can only go as far clockwise as 10 and as far the other way as -10?

I think what you want might be Mathf.Clamp.