From fd527f92164b8efdb746cffcf23c4f033fbffa76 Mon Sep 17 00:00:00 2001 From: Briggs Baltzell Date: Sat, 1 Jul 2023 15:29:40 -0500 Subject: Added VFR::getDeltaFrame (#122) * Added getDeltaFrame and changed getDeltaTime * Replaced getDeltaTime usages with getDeltaFrame * Moved getDeltaTime above getDeltaFrame --- src/KingSystem/System/VFRValue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/KingSystem/System/VFRValue.cpp') diff --git a/src/KingSystem/System/VFRValue.cpp b/src/KingSystem/System/VFRValue.cpp index aa9328b2..de18914e 100644 --- a/src/KingSystem/System/VFRValue.cpp +++ b/src/KingSystem/System/VFRValue.cpp @@ -13,7 +13,7 @@ util::InitTimeInfoEx sInitInfo; template void updateStatsImpl(const T& value, T* prev_value, T* mean) { - const T new_mean = ((*prev_value + value) / 2) * VFR::instance()->getDeltaTime(); + const T new_mean = ((*prev_value + value) / 2) * VFR::instance()->getDeltaFrame(); *prev_value = value; *mean = new_mean; } @@ -49,7 +49,7 @@ bool VFRValue::lerp(const f32& b, f32 t, f32 max_delta, f32 min_delta) { } bool VFRValue::chase(const f32& target, f32 step) { - const auto delta = step * VFR::instance()->getDeltaTime(); + const auto delta = step * VFR::instance()->getDeltaFrame(); return sead::Mathf::chase(&value, target, delta); } -- cgit v1.2.3