How to clamp horizontal rotation of the camera?

Hi, maybe you can help me with this. I want to add some horizontal clamp to the Unity’s MouseLook script from the Standard Assets by copy and edit the ClampRotationAroundXAxis function that is already in there. After a lot of tryings I give up. Maybe I should use another technique but my scripting skills are just not high enough to solve the problem.

Did you try this?

yRotation = Mathf.Clamp(yRotation, -90,90);