rescale
v10.0.0
Published
Rescale data
Downloads
15
Maintainers
Readme
rescale
Rescale data
Install
npm i rescale
Usage
var Decimal = require('linear-arbitrary-precision')(require('floating-adapter'));
var rescale = require('rescale')(Decimal).rescale;
rescale([-3, 5], [10, 20], -1); // => Decimal 12.5
rescale([0, 100], [32, 212], 40); // => Decimal 104
See spec.
Related projects
- linear-converter: flexible linear converter with built in conversions for common units.
- scale: scales normalised data.
- normalise: normalise data to [0, 1].
- rescale-util: rescale utilities.