Name for this algorithm?
This is sometimes called "0-1 normalization" or "feature scaling".  

http://en.wikipedia.org/wiki/Feature_scaling

http://en.wikipedia.org/wiki/Normalization_(statistics)

The entire function f() is a Piecewise function, which consists of 3 domains, defined separately for 


v &lt;= min
v is between min and max, and 
v >= max.  


The primary function is the normalization function when v is between min and max.  The other two functions just limit the range or codomain of the function.  

Piecewise functions are used often in mathematics to make the whole function continuous over a larger domain or to handle special cases like divide by zero, which the original poster might want to handle when min == max.      

And what does the function do?
Creates a function f(x) where f(min) returns 0.0, f(max) returns 1.0, and f(v) rescales the input v from 0.0 to 1.0 linearly. Anything less than min maps to 0.0; anything more than max maps to 1.0.  

One application of this is to calculate the percentile of a data samples (but from 0.0 to 1.0 vice 0 to 100).