mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-29 09:58:05 +00:00
[hid_core, input_common] use std::numbers::pi{_v} instead of re-defining (#4160)
don't reinvent the wheel, simple as that. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4160 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <numbers>
|
||||
#include "common/math_util.h"
|
||||
#include "hid_core/resources/touch_screen/gesture_handler.h"
|
||||
|
||||
@@ -214,7 +215,7 @@ void GestureHandler::UpdatePanEvent(GestureState& next_state, GestureType& type)
|
||||
if (std::abs(angle_between_two_lines) > AngleThreshold) {
|
||||
type = GestureType::Rotate;
|
||||
next_state.scale = 0;
|
||||
next_state.rotation_angle = angle_between_two_lines * 180.0f / Common::PI;
|
||||
next_state.rotation_angle = angle_between_two_lines * 180.0f / float(std::numbers::pi_v<float>);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user