From db58652680bfeba56c45ad0d5f349f6a7c4d72b6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 26 Feb 2019 22:31:15 -0500 Subject: [PATCH] common/quaternion: Move Quaternion into the Common namespace Quaternion is within the common library, so it should be using the Common namespace. --- src/common/quaternion.h | 4 ++-- src/input_common/motion_emu.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/quaternion.h b/src/common/quaternion.h index ea39298c1f..f372143d96 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h @@ -6,7 +6,7 @@ #include "common/vector_math.h" -namespace Math { +namespace Common { template class Quaternion { @@ -46,4 +46,4 @@ inline Quaternion MakeQuaternion(const Math::Vec3& axis, float ang return {axis * std::sin(angle / 2), std::cos(angle / 2)}; } -} // namespace Math +} // namespace Common diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp index 31e11875de..90c9ea1075 100644 --- a/src/input_common/motion_emu.cpp +++ b/src/input_common/motion_emu.cpp @@ -87,8 +87,8 @@ private: void MotionEmuThread() { auto update_time = std::chrono::steady_clock::now(); - Math::Quaternion q = MakeQuaternion(Math::Vec3(), 0); - Math::Quaternion old_q; + Common::Quaternion q = Common::MakeQuaternion(Math::Vec3(), 0); + Common::Quaternion old_q; while (!shutdown_event.WaitUntil(update_time)) { update_time += update_duration; @@ -98,8 +98,8 @@ private: std::lock_guard guard(tilt_mutex); // Find the quaternion describing current 3DS tilting - q = MakeQuaternion(Math::MakeVec(-tilt_direction.y, 0.0f, tilt_direction.x), - tilt_angle); + q = Common::MakeQuaternion(Math::MakeVec(-tilt_direction.y, 0.0f, tilt_direction.x), + tilt_angle); } auto inv_q = q.Inverse();