Mathf.Pingpong without the repetition!?

Using this to change materials in a transtition…but would like it to stop reverting back to the main material1 after. Is there another way other then Mathf.Pingpong or a way to stop if after getting material2???

  // Blends between two materials
    
    var material1 : Material;
    var material2 : Material;
    var duration = 5.0;
    
    function Start () {
    
        // At start, use the first material
    	renderer.material = material1;
    	
    }
    
    function Update () {
    
         // ping-pong between the materials over the duration
         var lerp : float = Mathf.PingPong (Time.time, duration) / duration;
         renderer.material.Lerp (material1, material2, lerp);
    	
    }

You could just use Mathf.Clamp(). Or you take a look at iTween, a powerful script providing all sorts of interpolation/fading/transformation/animation functions.