Sha256: 2f7eb2723fc2638e1d2b411af332d124137fd7f3d31ed7345df47a5c16abf169
Contents?: true
Size: 286 Bytes
Versions: 69
Compression:
Stored size: 286 Bytes
Contents
define(['./lerp', './norm'], function(lerp, norm){ /** * Maps a number from one scale to another. * @example map(3, 0, 4, -1, 1) -> 0.5 */ function map(val, min1, max1, min2, max2){ return lerp( norm(val, min1, max1), min2, max2 ); } return map; });
Version data entries
69 entries across 69 versions & 2 rubygems