Please advise how to translate the GLSL code below into CG. I want to reuse this function multiple times in one shader:
float remap(float value, float low1, float high1, float low2, float high2){
return(low2 + (high2 - low2) * (value - low1) / (high1 - low1));
}