summaryrefslogtreecommitdiff
path: root/src/KingSystem/System/VFRValue.cpp
diff options
context:
space:
mode:
authorBriggs Baltzell <b3apollo13@gmail.com>2023-07-01 15:29:40 -0500
committerGitHub <noreply@github.com>2023-07-01 21:29:40 +0100
commitfd527f92164b8efdb746cffcf23c4f033fbffa76 (patch)
tree492976adfdf031252c85de91a185bfd625738a0c /src/KingSystem/System/VFRValue.cpp
parentbdd6e57d63bde1714fb42197ac4080833ac6b572 (diff)
Added VFR::getDeltaFrame (#122)
* Added getDeltaFrame and changed getDeltaTime * Replaced getDeltaTime usages with getDeltaFrame * Moved getDeltaTime above getDeltaFrame
Diffstat (limited to 'src/KingSystem/System/VFRValue.cpp')
-rw-r--r--src/KingSystem/System/VFRValue.cpp4
1 files changed, 2 insertions, 2 deletions
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 <typename T>
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);
}