summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-03 11:11:56 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-04 06:58:13 +0100
commit12dddee0662ff9eb3ecaf655db8da22e33e9eb4f (patch)
tree9654ab0fbc289c07f7847da7a4a5ec8235781c8f /src
parentba31abd91c5d783a382999f05720b5a116065338 (diff)
src/object: b?
Diffstat (limited to 'src')
-rw-r--r--src/object.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/object.cpp b/src/object.cpp
index b825974f..db3c5b67 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -289,7 +289,6 @@ bool object::move_to(Magnum::Vector2i delta)
uint32_t object::allocate_frame_time(Ns dt, uint16_t& accum, uint32_t hz, float speed)
{
- using ld = long double;
constexpr auto ns_in_sec = Ns(1e9);
constexpr auto u16_max = uint64_t{65535};
@@ -297,7 +296,7 @@ uint32_t object::allocate_frame_time(Ns dt, uint16_t& accum, uint32_t hz, float
fm_assert(dt >= Ns{0});
const auto from_accum = uint64_t{accum} * ns_in_sec / u16_max;
- const auto from_dt = Ns(uint64_t(ld(dt.stamp) * ld(speed)));
+ const auto from_dt = Ns(uint64_t(double(dt.stamp) * double(speed)));
fm_assert(from_dt <= Ns{uint64_t{1} << 54});
const auto ticks = from_dt + from_accum;
const auto frame_duration = ns_in_sec / hz;