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

@ -137,7 +137,7 @@ public:
struct Tri { struct Tri {
zeus::CPlane x0_plane; zeus::CPlane x0_plane;
zeus::CVector3f x10_[3]; zeus::CVector3f x10_verts[3];
}; };
Tri getTri(EBoxFaceId face, int windOffset) const; Tri getTri(EBoxFaceId face, int windOffset) const;

View File

@ -17,15 +17,6 @@
namespace zeus { namespace zeus {
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;
}
class CNUQuaternion; class CNUQuaternion;
/** Unit quaternion, used for all quaternion arithmetic */ /** Unit quaternion, used for all quaternion arithmetic */

View File

@ -156,7 +156,7 @@ CAABox::Tri CAABox::getTri(EBoxFaceId face, int windOffset) const {
break; break;
} }
return {zeus::CPlane(verts[windOffset % 2], verts[(windOffset + 1) % 2], verts[(windOffset + 2) % 2]), return {zeus::CPlane(verts[windOffset % 2], verts[(windOffset + 1) % 2], verts[(windOffset + 2) % 2]),
verts[windOffset % 2], verts[(windOffset + 1) % 2], verts[(windOffset + 2) % 2]}; {verts[windOffset % 2], verts[(windOffset + 1) % 2], verts[(windOffset + 2) % 2]}};
} }
} // namespace zeus } // namespace zeus

View File

@ -275,6 +275,15 @@ CRelAngle CQuaternion::angleFrom(const zeus::CQuaternion& other) {
return std::acos(zeus::clamp(-1.f, dot(other), 1.f)); 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 CQuaternion::lookAt(const CUnitVector3f& source, const CUnitVector3f& dest, const CRelAngle& maxAng) {
CQuaternion q; CQuaternion q;
zeus::CVector3f destNoZ = dest; zeus::CVector3f destNoZ = dest;