From 0e792b213a9f8073d3c5ea49102bfbc913232584 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 14 Oct 2017 19:24:17 -1000 Subject: [PATCH] Minor API tweaks --- include/zeus/CPlane.hpp | 2 +- include/zeus/CQuaternion.hpp | 2 +- src/CQuaternion.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/zeus/CPlane.hpp b/include/zeus/CPlane.hpp index 4797ea2..1010ea5 100644 --- a/include/zeus/CPlane.hpp +++ b/include/zeus/CPlane.hpp @@ -12,7 +12,7 @@ class alignas(16) CPlane public: ZE_DECLARE_ALIGNED_ALLOCATOR(); - inline CPlane() : a(1.f), d(0.f) {} + inline CPlane() : a(1.f), b(0.f), c(0.f), d(0.f) {} CPlane(float a, float b, float c, float d) : a(a), b(b), c(c), d(d) {} CPlane(const CVector3f& a, const CVector3f& b, const CVector3f& c) { diff --git a/include/zeus/CQuaternion.hpp b/include/zeus/CQuaternion.hpp index 8629e43..b9b3d19 100644 --- a/include/zeus/CQuaternion.hpp +++ b/include/zeus/CQuaternion.hpp @@ -260,7 +260,7 @@ public: static CQuaternion slerpShort(const CQuaternion& a, const CQuaternion& b, double t); static CQuaternion nlerp(const CQuaternion& a, const CQuaternion& b, double t); static CQuaternion shortestRotationArc(const zeus::CVector3f& v0, const zeus::CVector3f& v1); - static CQuaternion clampedRotateTo(const zeus::CVector3f& v0, const zeus::CVector3f& v1, + static CQuaternion clampedRotateTo(const zeus::CUnitVector3f& v0, const zeus::CUnitVector3f& v1, const zeus::CRelAngle& angle); inline float roll() const { return std::atan2(2.f * (x * y + w * z), w * w + x * x - y * y - z * z); } diff --git a/src/CQuaternion.cpp b/src/CQuaternion.cpp index d6ccb9b..c315b92 100644 --- a/src/CQuaternion.cpp +++ b/src/CQuaternion.cpp @@ -233,7 +233,7 @@ CQuaternion CQuaternion::shortestRotationArc(const zeus::CVector3f& v0, const ze } } -CQuaternion CQuaternion::clampedRotateTo(const zeus::CVector3f& v0, const zeus::CVector3f& v1, +CQuaternion CQuaternion::clampedRotateTo(const zeus::CUnitVector3f& v0, const zeus::CUnitVector3f& v1, const zeus::CRelAngle& angle) { CQuaternion arc = shortestRotationArc(v0, v1);