Utils.map()

Interpolate the number given as first parameter between boundaies given as second and third parameter then map it to boundaries given as fourth and fifth parameters

Parameters

NameTypeDescription
1xnumber
2sourceMinnumber
3sourceMaxnumber
4destMinnumber
5destMaxnumber

Return value

number

the result

Usage

import {Utils} from '@lcluber/type6js';

let map = Utils.map(100, 0, 1080, 20, 340);
console.log(map);