bf7dc5d5f81b78c656704d7b16b75a1944a43df8
[platform/framework/web/crosswalk-tizen.git] /
1 define(['./lerp', './norm'], function(lerp, norm){
2     /**
3     * Maps a number from one scale to another.
4     * @example map(3, 0, 4, -1, 1) -> 0.5
5     */
6     function map(val, min1, max1, min2, max2){
7         return lerp( norm(val, min1, max1), min2, max2 );
8     }
9     return map;
10 });