public class Integration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
integral |
private double |
lastReading |
private long |
lastReadingMillis |
Constructor and Description |
---|
Integration(double initialValue,
double reading)
Create the integration object with the initial value for the integral value
and the initial reading.
|
Modifier and Type | Method and Description |
---|---|
double |
addReading(double reading)
Add a new reading and return the current integral
|
private long lastReadingMillis
private double lastReading
private double integral