Help clamping a Rotation

I know this has been asked before, but, I can´t implement the other answers within my code (very noob here). Any help, greatly apreciated:

I have a turret and want to clamp the rotation, at 90° an 0°, so that it can only fire within that range.

var angle:float = 0.0f;

function Tilt (){

var spinAmount = Time.deltaTime*100;	
if (Input.GetKey(KeyCode.Q))
{	
   angle = spinAmount; 
   transform.Rotate(angle,0,0);
}

thankx!

The simplest way in my opinion is to do Mathf.Clamp.

    funtion Update(){
    var anglesToEdit : type;
    angleToEdit.angle = Mathf.Clamp(angleToEdit.angle), -45, 45);
//the angle you're clamping is probably the .y 
//because that is the vertical axis which is used 
//to rotate left and right
    }

and personally I would clamp the angle between -45 and 45 because your turret more than likely originally spawns with the center facing forward at 0