diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-02 11:58:15 -0400 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-09-02 11:58:15 -0400 |
| commit | f3417b01e1e43a481d9e62017be5bdee689bf8ce (patch) | |
| tree | 4c76baa8419fa8cb23c7c6ad2fa12a70d3c75426 /src/input_common/motion_input.cpp | |
| parent | 60e59d1d0c267db905cc1aed01a25ba131718a13 (diff) | |
input_common/motion_input: Make use of Common::PI constant
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
Diffstat (limited to 'src/input_common/motion_input.cpp')
| -rw-r--r-- | src/input_common/motion_input.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input_common/motion_input.cpp b/src/input_common/motion_input.cpp index 88fddb1b98..22a849866d 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; |
