mapalizer
v1.0.0
Published
Map & Normalize values between a given range
Downloads
2
Maintainers
Readme
Mapalizer
An npm module to map and normalize a value in a given range
Installation
npm install mapalizer
Usage
Provide the 5 required arguments in the function call and the normalized value will be returned
import useMapalizer from "mapalizer";
const result = useMapalizer(value: number,initalBaseVal: number,finalBaseVal: number,initalTargetVal: number, finalTargetVal: number);
Example
import useMapalizer from "mapalizer";
const result = useMapalizer(10, 1, 100, 20, 30);