Codebox Operators accum

accum

Additive accumulator

new accum([options])

Options

NameTypeDefaultDescription
maxnumber

Specifies the maximum value for the accumulated output.

minnumber

Specifies the minimum value for the accumulated output.

resetmodeenumpost

Specifies whether the count is reset before (pre) or after (post) the accumulation.

Enum Values:
pre | post

Aliases

  • +=
  • plusequals

Methods

next(x, reset): out1

Arguments

NameTypeDefaultDescription
xnumber
resetnumber

Returns

NameTypeDescription
out1number

The accumulated output

reset(): out1

Returns

NameTypeDescription
out1