UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

13 lines (12 loc) • 652 B
/** * Maps the value from one range of [inputMin..inputMax] to another range of [outputMin..outputMax]. * * @param {number} value The value to map. * @param {number} inputMin The input's minimum value. * @param {number} inputMax The input's maximum value. * @param {number} outputMin The output's minimum value. * @param {number} outputMax The output's maximum value. * @return {number} The input value mapped to the output range. * @link https://js-toolkit.studiometa.dev/utils/math/map.html */ export declare function map(value: number, inputMin: number, inputMax: number, outputMin: number, outputMax: number): number;