What I mean is this :
If the volume is 1
OriginalBarheight/1= OriginalBarheight
If the volume is 0.5
Barheight/0.5 = Barheight*2 = OriginalBarheight
If the volume is 0.25
Barheight/0.25 = Barheight*4 = OriginalBarheight
If the volume doesn't come as a decimal fraction then yes, it would make it smaller, in which case you'd have to turn it into a decimal fraction. ( EG: If volume can be 0-50 where 50 is the highest you'd have to divide the volume by 50 to get the decimal fraction.
In which case you'd simplify and end up with
CurrentBarheight=OriginalBarheight/MaxVolume*CurrentVolume
If the volume is 1
OriginalBarheight/1= OriginalBarheight
If the volume is 0.5
Barheight/0.5 = Barheight*2 = OriginalBarheight
If the volume is 0.25
Barheight/0.25 = Barheight*4 = OriginalBarheight
If the volume doesn't come as a decimal fraction then yes, it would make it smaller, in which case you'd have to turn it into a decimal fraction. ( EG: If volume can be 0-50 where 50 is the highest you'd have to divide the volume by 50 to get the decimal fraction.
In which case you'd simplify and end up with
CurrentBarheight=OriginalBarheight/MaxVolume*CurrentVolume