summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-09-02 17:58:15 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-09-02 17:58:15 +0200
commit45ecd601be9519f6c969746c7736cb0a7090560a (patch)
tree4c76baa8419fa8cb23c7c6ad2fa12a70d3c75426 /src
parentMerge pull request #4570 from german77/motionInput (diff)
downloadyuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar.gz
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar.bz2
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar.lz
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar.xz
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.tar.zst
yuzu-45ecd601be9519f6c969746c7736cb0a7090560a.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/math_util.h2
-rw-r--r--src/input_common/motion_input.cpp7
-rw-r--r--src/input_common/motion_input.h6
3 files changed, 10 insertions, 5 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index cc35c90ee..b35ad8507 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -9,7 +9,7 @@
namespace Common {
-constexpr float PI = 3.14159265f;
+constexpr float PI = 3.1415926535f;
template <class T>
struct Rectangle {
diff --git a/src/input_common/motion_input.cpp b/src/input_common/motion_input.cpp
index 88fddb1b9..22a849866 100644
--- a/src/input_common/motion_input.cpp
+++ b/src/input_common/motion_input.cpp
@@ -1,3 +1,8 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included
+
+#include "common/math_util.h"
#include "input_common/motion_input.h"
namespace InputCommon {
@@ -69,7 +74,7 @@ void MotionInput::UpdateOrientation(u64 elapsed_time) {
}
const auto normal_accel = accel.Normalized();
- auto rad_gyro = gyro * 3.1415926535f * 2;
+ auto rad_gyro = gyro * Common::PI * 2;
const f32 swap = rad_gyro.x;
rad_gyro.x = rad_gyro.y;
rad_gyro.y = -swap;
diff --git a/src/input_common/motion_input.h b/src/input_common/motion_input.h
index 445798a54..54b4439d9 100644
--- a/src/input_common/motion_input.h
+++ b/src/input_common/motion_input.h
@@ -1,6 +1,6 @@
-// Copyright 2014 Dolphin Emulator Project
-// Licensed under GPLv2+
-// Refer to the license.txt file included.
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included
#pragma once