mirror of https://github.com/AxioDL/zeus.git
Fix some compilation warnings
This commit is contained in:
parent
617875531a
commit
92733a3bb7
|
@ -137,7 +137,7 @@ public:
|
|||
|
||||
struct Tri {
|
||||
zeus::CPlane x0_plane;
|
||||
zeus::CVector3f x10_[3];
|
||||
zeus::CVector3f x10_verts[3];
|
||||
};
|
||||
Tri getTri(EBoxFaceId face, int windOffset) const;
|
||||
|
||||
|
|
|
@ -17,15 +17,6 @@
|
|||
|
||||
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;
|
||||
|
||||
/** Unit quaternion, used for all quaternion arithmetic */
|
||||
|
|
|
@ -156,7 +156,7 @@ CAABox::Tri CAABox::getTri(EBoxFaceId face, int windOffset) const {
|
|||
break;
|
||||
}
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue