Returns an accumulator function which incrementally computes a range.
accumulator function
var accumulator = incrrange();
var v = accumulator();
// returns null
v = accumulator( 2.0 );
// returns 0.0
v = accumulator( -1.0 );
// returns 3.0
v = accumulator( -3.0 );
// returns 5.0
v = accumulator();
// returns 5.0
If provided a value, returns an updated range; otherwise, returns the current range.
Notes
NaN
or a value which, when used in computations, results inNaN
, the accumulated value isNaN
for all future invocations.value
range