Implementing mathf ?

so far in my zoom script for my camera to zoom in and out iv got

public var fov = 60;

public var fovSpeed = 1;

function Update(){

if (Input.GetAxis(“Mouse ScrollWheel”)> 0){

Camera.main.fieldOfView = fovSpeed–;

}

if (Input.GetAxis(“Mouse ScrollWheel”)< 0){

Camera.main.fieldOfView = fov ++;

}

}

i want to add a clamp so i dont zoom in too far but how do i implement this?

Simply put the Mathf.Clamp after the setting that you are altering.

Camera.main.fieldOfView = fov++;
Camera.main.fieldOfView = Mathf.Clamp( Camera.main.fieldOfView, min, max );