diff options
| author | 2019-02-26 22:31:15 -0500 | |
|---|---|---|
| committer | 2019-02-26 22:31:17 -0500 | |
| commit | a1574aabd510d5fdc3842780b1d833aa2fb8eac6 (patch) | |
| tree | a8e990d67681629fd5383263180cbceb85582695 | |
| parent | Merge pull request #2164 from ReinUsesLisp/configure-blit (diff) | |
| download | yuzu-a1574aabd510d5fdc3842780b1d833aa2fb8eac6.tar.gz yuzu-a1574aabd510d5fdc3842780b1d833aa2fb8eac6.tar.xz yuzu-a1574aabd510d5fdc3842780b1d833aa2fb8eac6.zip | |
common/quaternion: Move Quaternion into the Common namespace
Quaternion is within the common library, so it should be using the
Common namespace.
Diffstat (limited to '')
| -rw-r--r-- | src/common/quaternion.h | 4 | ||||
| -rw-r--r-- | 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 c528c0b68..1c304b048 100644 --- a/src/common/quaternion.h +++ b/src/common/quaternion.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/vector_math.h" | 7 | #include "common/vector_math.h" |
| 8 | 8 | ||
| 9 | namespace Math { | 9 | namespace Common { |
| 10 | 10 | ||
| 11 | template <typename T> | 11 | template <typename T> |
| 12 | class Quaternion { | 12 | class Quaternion { |
| @@ -46,4 +46,4 @@ inline Quaternion<float> MakeQuaternion(const Math::Vec3<float>& axis, float ang | |||
| 46 | return {axis * std::sin(angle / 2), std::cos(angle / 2)}; | 46 | return {axis * std::sin(angle / 2), std::cos(angle / 2)}; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | } // namespace Math | 49 | } // namespace Common |
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp index 9570c060e..defb1a567 100644 --- a/src/input_common/motion_emu.cpp +++ b/src/input_common/motion_emu.cpp | |||
| @@ -85,8 +85,8 @@ private: | |||
| 85 | 85 | ||
| 86 | void MotionEmuThread() { | 86 | void MotionEmuThread() { |
| 87 | auto update_time = std::chrono::steady_clock::now(); | 87 | auto update_time = std::chrono::steady_clock::now(); |
| 88 | Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0); | 88 | Common::Quaternion<float> q = Common::MakeQuaternion(Math::Vec3<float>(), 0); |
| 89 | Math::Quaternion<float> old_q; | 89 | Common::Quaternion<float> old_q; |
| 90 | 90 | ||
| 91 | while (!shutdown_event.WaitUntil(update_time)) { | 91 | while (!shutdown_event.WaitUntil(update_time)) { |
| 92 | update_time += update_duration; | 92 | update_time += update_duration; |
| @@ -96,8 +96,8 @@ private: | |||
| 96 | std::lock_guard<std::mutex> guard(tilt_mutex); | 96 | std::lock_guard<std::mutex> guard(tilt_mutex); |
| 97 | 97 | ||
| 98 | // Find the quaternion describing current 3DS tilting | 98 | // Find the quaternion describing current 3DS tilting |
| 99 | q = MakeQuaternion(Math::MakeVec(-tilt_direction.y, 0.0f, tilt_direction.x), | 99 | q = Common::MakeQuaternion(Math::MakeVec(-tilt_direction.y, 0.0f, tilt_direction.x), |
| 100 | tilt_angle); | 100 | tilt_angle); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | auto inv_q = q.Inverse(); | 103 | auto inv_q = q.Inverse(); |