summaryrefslogtreecommitdiff
path: root/src/KingSystem/System/VFRValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/System/VFRValue.cpp')
-rw-r--r--src/KingSystem/System/VFRValue.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/KingSystem/System/VFRValue.cpp b/src/KingSystem/System/VFRValue.cpp
index f8452a72..aa9328b2 100644
--- a/src/KingSystem/System/VFRValue.cpp
+++ b/src/KingSystem/System/VFRValue.cpp
@@ -71,17 +71,7 @@ void VFRVec3f::lerp(const sead::Vector3f& b, f32 t) {
}
bool VFRVec3f::chase(const sead::Vector3f& target, f32 t) {
- const auto delta = VFR::instance()->getDeltaTime() * t;
- const auto diff = target - value;
- const auto norm = diff.length();
-
- if (norm <= delta) {
- sead::MemUtil::copy(&value, &target, sizeof(value));
- return true;
- }
-
- value += diff * (1.0f / norm) * delta;
- return false;
+ return VFR::chaseVec(&value, target, t);
}
void VFRValue::setToMax(const f32& max) {