integrate-dt

xod/core/integrate-dt

Integrates input value over time
integrate-dt
@/integrate-dt
Integrates input value over time
INnumber
The value to integrate
PUSHpulse
Updates the accumulated value with changes since the last push
RSTpulse
Resets the output to 0 and starts integration over
integrate-dt
OUT
IN
PUSH
RST
OUTnumber
The accumulated value

Tabular tests

__time(ms)INPUSHRSTOUT
01pulseno-pulse0
1001pulseno-pulse0.1
5001pulseno-pulse0.5
10001pulseno-pulse1
// integrate after reset discards values before reset
15001no-pulsepulse0
16001pulseno-pulse0.1~
// edge case whrere IN is Inf
0Infno-pulsepulse0
1000Infpulseno-pulseInf
2000-Infpulseno-pulseNaN