growth-curve

0.0.5 • Public • Published

Build Status

growth-curve

Calculate compound growth with inflection points.

Example:

var GrowthCurve = require('growth-curve');
 
var killerGrowth = new GrowthCurve({ "1": 1.02, "5": 1.10, "25": 1.20, "46": 2 });
 
var healthAt47 = gentleGrowth.growTo(100, 47);
 
var rateAt33 = gentleGrowth.getRate(33); // returns 1.2

Constructor

new GrowthCurve( inflectionPoints )

inflectionPoints is an object with rules governing the compound rates at the iterations where they change.

Methods

growTo( initial, target );

Returns the value of initial after it has been compounded target number of times with changes to the rate set according to the rules given in the constructor.

getPoint( target );

Returns the point that the growthCurve would use at the target iteration.

getRate( target );

Returns the rate that the growthCurve would use at the target iteration.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    4
  • 0.0.3
    3
  • 0.0.2
    3
  • 0.0.1
    1

Package Sidebar

Install

npm i growth-curve

Weekly Downloads

10

Version

0.0.5

License

MIT

Last publish

Collaborators

  • bjornstar