WIP161212
parent
4558ca16b0
commit
84d4cd221e
|
@ -2,6 +2,7 @@ package org.hwo;
|
|||
|
||||
public class Smoother {
|
||||
|
||||
private int lastValue;
|
||||
private int summe;
|
||||
private int wert;
|
||||
private int tn;
|
||||
|
@ -15,6 +16,7 @@ public class Smoother {
|
|||
|
||||
public int cycle(int value)
|
||||
{
|
||||
lastValue = value;
|
||||
summe += value;
|
||||
wert = summe / tn;
|
||||
summe -= wert;
|
||||
|
@ -46,6 +48,9 @@ public class Smoother {
|
|||
this.tn = tn;
|
||||
}
|
||||
|
||||
public int getLastValue(){
|
||||
return lastValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue