mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-08 22:59:06 +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:
parent
a746ac45e4
commit
55da593e59
@ -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);
|
||||||
@ -88,9 +91,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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user