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