List of utility methods to do Number Range Create
float | RangeConvert(float start, float end, float newStart, float newEnd, float value) Range Convert if (value < start || value > end) { System.err.println("Value was outside initial range."); return value; double scale = (double) (newEnd - newStart) / (end - start); return (float) (newStart + ((value - start) * scale)); |