2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-08-08 22:19:07 +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, zeus::CVector3f CCinematicCamera::GetInterpolatedSplinePoint(const std::vector<zeus::CVector3f>& points, int& idxOut,
float tin) const { float tin) const {
if (points.size() > 0) { if (points.empty()) {
return {};
}
const float cycleT = std::fmod(tin, x1e8_duration); const float cycleT = std::fmod(tin, x1e8_duration);
const float durPerPoint = x1e8_duration / float(points.size() - 1); const float durPerPoint = x1e8_duration / float(points.size() - 1);
idxOut = int(cycleT / durPerPoint); idxOut = int(cycleT / durPerPoint);
@ -90,9 +93,6 @@ zeus::CVector3f CCinematicCamera::GetInterpolatedSplinePoint(const std::vector<z
return zeus::getCatmullRomSplinePoint(ptA, ptB, ptC, ptD, t); return zeus::getCatmullRomSplinePoint(ptA, ptB, ptC, ptD, t);
} }
return {};
}
zeus::CQuaternion CCinematicCamera::GetInterpolatedOrientation(const std::vector<zeus::CQuaternion>& rotations, zeus::CQuaternion CCinematicCamera::GetInterpolatedOrientation(const std::vector<zeus::CQuaternion>& rotations,
float tin) const { float tin) const {
if (rotations.empty()) { if (rotations.empty()) {