public double convert(double input) { //newValue = newMax + (newMax - newMin) * (oldValue- oldMax) / (oldMax - oldMin) input = 1 + (1 - 0) * (input- 1) / (1 - -1); return input; }