From 1b855efd5eb21ef802d15f6a531878754904ad4d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 26 Feb 2019 22:38:34 -0500 Subject: common/vector_math: Move Vec[x] types into the Common namespace These types are within the common library, so they should be using the Common namespace. --- src/common/quaternion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/quaternion.h') diff --git a/src/common/quaternion.h b/src/common/quaternion.h index 1c304b048..370198ae0 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h @@ -11,7 +11,7 @@ namespace Common { template class Quaternion { public: - Math::Vec3 xyz; + Vec3 xyz; T w{}; Quaternion Inverse() const { @@ -38,11 +38,11 @@ public: }; template -auto QuaternionRotate(const Quaternion& q, const Math::Vec3& v) { +auto QuaternionRotate(const Quaternion& q, const Vec3& v) { return v + 2 * Cross(q.xyz, Cross(q.xyz, v) + v * q.w); } -inline Quaternion MakeQuaternion(const Math::Vec3& axis, float angle) { +inline Quaternion MakeQuaternion(const Vec3& axis, float angle) { return {axis * std::sin(angle / 2), std::cos(angle / 2)}; } -- cgit v1.2.3