remap-value
v1.0.0
Published
Remaps a value from one range to another
Downloads
17
Readme
remap-value
Installation
npm install remap-value --save
Syntax
remapValue(value, currentRangeStart, currentRangeEnd, targetRangeStart, targetRangeEnd)
Usage
import remapValue from 'remap-value';
remapValue(0.5, 0, 1, 0, 100); // 50
remapValue(-1, 0, 1, 0, 100); // -100
Tests
npm test
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 1.0.0 Initial release