2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-08-09 13:39:09 +00:00

CCinematicCamera: Unindent code in GetInterpolatedSplinePoint()

Puts the empty case into the conditional to allow unindenting most of
the code block.
This commit is contained in:
Lioncash 2020-08-01 05:12:28 -04:00
parent a746ac45e4
commit 55da593e59

View File

@ -48,7 +48,10 @@ void CCinematicCamera::WasDeactivated(CStateManager& mgr) {
zeus::CVector3f CCinematicCamera::GetInterpolatedSplinePoint(const std::vector<zeus::CVector3f>& points, int& idxOut,
float tin) const {
if (points.size() > 0) {
if (points.empty()) {
return {};
}
const float cycleT = std::fmod(tin, x1e8_duration);
const float durPerPoint = x1e8_duration / float(points.size() - 1);
idxOut = int(cycleT / durPerPoint);
@ -88,9 +91,6 @@ zeus::CVector3f CCinematicCamera::GetInterpolatedSplinePoint(const std::vector<z
}
return zeus::getCatmullRomSplinePoint(ptA, ptB, ptC, ptD, t);
}
return {};
}
zeus::CQuaternion CCinematicCamera::GetInterpolatedOrientation(const std::vector<zeus::CQuaternion>& rotations,