From 84d4cd221ea79e0a562c459ef13ed2c3fea248ca Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Mon, 12 Dec 2016 11:34:44 +0100 Subject: [PATCH] WIP161212 --- src/org/hwo/Smoother.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/hwo/Smoother.java b/src/org/hwo/Smoother.java index 91832c3..afa7f6c 100644 --- a/src/org/hwo/Smoother.java +++ b/src/org/hwo/Smoother.java @@ -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; + } }