Rotate a camera when my flashlight is on the edge of the screen... Video included

As you can see in the video, I have limited my flashlight so that it does not go off-screen. What i want to do with this is when my flashlight reaches the edge, I want the player to rotate as if he was looking. Here are my scripts if you need them:
My flashlight Script:

using UnityEngine;
using System.Collections;

public class FlashlightTurn : MonoBehaviour {

public float lookSensitivity;
private float yRotation;
private float xRotation;
private float currentYRotation;
private float currentXRotation;
private float yRotationV;
private float xRotationV;
public float lookSmoothDamp;

private Quaternion lookForward;
public float lookSpeed;

public Transform camera;

private Vector3 lookLeftLimit;

void Start () {

    lookForward = transform.rotation;
    lookLeftLimit = new Vector3(0,130,0);
}

void Update () {
    if (!Input.anyKey)
    {
        yRotation += Input.GetAxis("Mouse X") * lookSensitivity;
        xRotation -= Input.GetAxis("Mouse Y") * lookSensitivity;

        xRotation = Mathf.Clamp(xRotation, -30, 30);
        yRotation = Mathf.Clamp(yRotation, -50, 30);

        currentXRotation = Mathf.SmoothDamp(currentXRotation, xRotation, ref xRotationV, lookSmoothDamp);
        currentYRotation = Mathf.SmoothDamp(currentYRotation, yRotation, ref yRotationV, lookSmoothDamp);

        transform.localRotation = Quaternion.Euler(xRotation, yRotation, 0);
        

    }
    if(Input.GetKey("w") || Input.GetKey("s") || Input.GetKey("a") || Input.GetKey("d"))
        transform.localRotation = Quaternion.Lerp(transform.localRotation, lookForward, lookSpeed * Time.deltaTime);

    if (transform.localEulerAngles == lookLeftLimit) {
        xRotation += Input.GetAxis("Mouse Y") * lookSensitivity;
        transform.localRotation = Quaternion.Euler(xRotation, yRotation, 0);
    }
        

}

}

You can use the function I wrote in this question:
http://answers.unity3d.com/questions/425712/how-can-i-move-the-camera-when-the-mouse-reaches-t.html

The function will return a Vector2, the x denotes how close the mouse is to the left-right edge while the y denotes the top-bottom edge.

You can do something like this:

//50 is the margin
//The larger the value, the closer it is to the edge
Vector edge = MouseScreenEdge( 50 ); 

if( edge.x < 0 ) { //Left
    //Rotate the camera here

    //You can use the edge.x to control how far
    //you want to rotate the camera
}
else if( edge.x > 0 ){ //Right

}

You should be able to just check if the yRotation variable is smaller or greater than a certain min or max value and depending on that rotate the camera e.g.:

if(yRotation < minRotation)
{
  Debug.Log("Turn Left");
  cam.transform.Rotate(-Vector3.up * Time.deltaTime * lookSensitivity);
}
else if(yRotation > maxRotation)
{
  Debug.Log("Turn Right");
  cam.transform.Rotate(Vector3.up * Time.deltaTime * lookSensitivity);
}