No, the ranges are necessarly the same. fmin will allways be smaller than fmax, and imin will allways be smaller than imax.

Here is what I came up with... It works, but only for positive values, which is sufficient for now.

Code:

int ConvertRange(float fmin, float fmax, float cur, int imin, int imax) {
fmax -= fmin; //makes the range from 0 to fmax
cur -= fmin;
float foff = 1.0f - fmax; //the ammount to change fmax to make it from 0 to 1, make it % based
cur += cur*foff; //fix cur so it stays in the right position in the relitave range
fmax += foff; //fmax should be 1.0f / 100%
float ir = imax-imin; //integer range
int i = imin + (int)(ir*cur+0.5);
return i;
}