# HG changeset patch # User postspectacular # Date 1327487492 0 # Node ID 203b4bda6b2aca5b4d4f070ece9cbcd6f6849ee0 # Parent 9ba0a16897f18de93e232d249e3934a5cf09bad6 minor optimization in ScaleMap.getClippedValueFor() & getMappedValueFor() diff -r 9ba0a16897f18de93e232d249e3934a5cf09bad6 -r 203b4bda6b2aca5b4d4f070ece9cbcd6f6849ee0 src.core/toxi/math/ScaleMap.java --- a/src.core/toxi/math/ScaleMap.java Mon Jan 16 04:34:56 2012 +0000 +++ b/src.core/toxi/math/ScaleMap.java Wed Jan 25 10:31:32 2012 +0000 @@ -75,7 +75,7 @@ if (Double.isNaN(t)) { t = 0; } - return mapFunction.interpolate(0, mapRange, t) + out.min; + return mapFunction.interpolate(out.min, out.max, t); } /** @@ -113,7 +113,7 @@ if (Double.isNaN(t)) { t = 0; } - return mapFunction.interpolate(0, (float) mapRange, t) + out.min; + return mapFunction.interpolate(out.min, out.max, t); } /**