I don't quite understand. The float to int conversion truncates the remainder, so that your current code evaluates as
int ip = (int)(currentVolume * 100);
currentVolume * 100 is first evaluated as a floating point value, 22.00. Thus, your code should result in ip being assigned the value 22, not 20. To convert an integer back to a floating point value, you can simply cast it. To alter the range, you simply divide. Thus, your function should look something like this:
float SetMeter( int vValue)
return static_cast\(vValue / 100.0f);
I would probably same the function more descriptively to ensure that I didn't forget about the division by 100. Note, that given an integer value of 20, this function will return a floating point value of 0.20; not 0.22. Without any extra information about the original value, it is not possible to recover 0.22 from the integer. Hope this helps.