summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-03 09:37:42 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-04 06:58:11 +0100
commit93c4202c75cfed2a6e6697c45d50b25ebc00ebcf (patch)
tree6d41d4a0753ae967aba8d495d590e2c34a6cc918 /main
parent0961fca16a0d007c58d377a3d246ead08f63de7b (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/draw.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index 10590fce..435309a0 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -27,11 +27,11 @@ void main_impl::do_update()
if (auto secs = Time::to_seconds(dt); secs > eps)
{
#if 1
- constexpr float RC = 60;
- constexpr auto alpha = 1 / (1 + RC);
+ constexpr double RC = 60;
+ constexpr double alpha = 1 / (1 + RC);
auto& value = _frame_timings.smoothed_frame_time;
- value = value*(1 - alpha) + alpha * secs;
+ value = (float)(value*(1 - alpha) + alpha * secs);
#else
value = secs;
#endif