logrange
Logarithmic range between two numbers.
Example
Ascending logarithmic range:
//=> [4, 8, 16, 32, 64, 128, 256, 512]
Descending logarithmic range:
//=> [4, 2, 1, 0.5, 0.25, 0.125]
API
logrange([opts], first, last, ratio)
Returns array of multiples of first
up to last
:
first first*ratio first*ratio*ratio ...
opts.inclusive
Type: Boolean
Default: false
If set, last
is included if it is a part of the sequence.
Install
npm install logrange
License
MIT