From 2d05fe9ea939cde6af8b977bff894a4a70ce6aa2 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Fri, 24 Dec 2021 21:01:16 +0300 Subject: [PATCH] Add smooth_updater::value --- libs/util/include/psemek/util/smooth_updater.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/util/include/psemek/util/smooth_updater.hpp b/libs/util/include/psemek/util/smooth_updater.hpp index aea3fe28..8192155f 100644 --- a/libs/util/include/psemek/util/smooth_updater.hpp +++ b/libs/util/include/psemek/util/smooth_updater.hpp @@ -58,6 +58,11 @@ namespace psemek::util value_ = lerp(target_, value_, std::exp(- dt * speed_)); } + Value const & value() const + { + return target_; + } + private: Value & value_; Value target_;