Fix some compilation warnings

This commit is contained in:
Jack Andersen
2019-04-06 19:01:22 -10:00
parent 617875531a
commit 92733a3bb7
4 changed files with 11 additions and 11 deletions

View File

@@ -275,6 +275,15 @@ CRelAngle CQuaternion::angleFrom(const zeus::CQuaternion& other) {
return std::acos(zeus::clamp(-1.f, dot(other), 1.f));
}
static float normalize_angle(float angle) {
if (angle > M_PIF)
angle -= 2.f * M_PIF;
else if (angle < -M_PIF)
angle += 2.f * M_PIF;
return angle;
}
CQuaternion CQuaternion::lookAt(const CUnitVector3f& source, const CUnitVector3f& dest, const CRelAngle& maxAng) {
CQuaternion q;
zeus::CVector3f destNoZ = dest;