private static float mapValue(float x, float inputMin, float inputMax, float min, float max) {
        return (x - inputMin) * (max - min) / (inputMax - inputMin) + min;
    }
Maps a value from inputMin to inputMax to a range from min to max.

@param x
@param inputMin
@param inputMax
@param min
@param max
@return the mapped value
jme3-examples/src/main/java/jme3test/games/WorldOfInception.java