Utils.normalize()

Convert the number given as first parameter to a number from zero to one that indicates where it lies in the range given as second and third parameters

Parameters

NameTypeDescription
1xnumber
2minnumber
3maxnumber

Return value

number

the result

Usage

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

let number = 2;
let normalize = Utils.normalize(number, 1, 4);
console.log(normalize); //0.33333