was.js
/tags/1.0.0/lib/mathematics/algebra.js |
---|
@@ -0,0 +1,8 @@ |
/*************************************************************************/ |
/* Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 */ |
/*************************************************************************/ |
function wasMapValueToRange(value, xMin, xMax, yMin, yMax) { |
return yMin + ( |
( yMax - yMin ) * ( value - xMin ) / ( xMax - xMin ) |
); |
} |