FUNCTION TRI,X ;+ ; FUNCTION TRI,X ; Computes the standard TRI function for any list of values represented ; by the vector x. ; ; USAGE: ; x=FINDGEN(1001)/20-25 CREATE A VECTOR ON THE INTERVAL [-25,25] ; y=TRI((x-8)/5) Construct a function that is shifted and stretched ; ; HISTORY ; Written by Harvey Rhody, May, 2000 ;- RETURN,0.0*X+(X GE -1 AND X LE 0)*(X+1)+ $ (X GT 0 AND X LE 1)*(1-X) END