Skip to content

javiercejudo/rescale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rescale

Build Status Coverage Status Code Climate

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