From 7af17a5d94a6088275d5a5d9cc4da3d9305572ee Mon Sep 17 00:00:00 2001 From: Nuno Pelagio Date: Fri, 2 May 2025 11:58:43 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Fix=20#32064:=20Inconsistent=20angle=20disp?= =?UTF-8?q?lay=20when=20rotation=20objects.=20The=20normalization=20formul?= =?UTF-8?q?a=20didn't=20handle=20the=20180=C2=B0=20boundary=20consistently?= =?UTF-8?q?,=20and=20produced=20asymmetric=20results=20for=20top=20vs.=20b?= =?UTF-8?q?ottom=20rotation=20points.=20Changes=20made:=20replaced=20the?= =?UTF-8?q?=20angle=20normalization=20with=20symmetric=20normalization,=20?= =?UTF-8?q?and=20forced=20180=C2=BA=20to=20be=20the=20displayed=20angle=20?= =?UTF-8?q?across=20all=20rotation=20points.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Edit/Compose/Components/SelectionBoxRotationHandle.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs index 03d600bfa2..3a1fcecc24 100644 --- a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs +++ b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs @@ -127,7 +127,9 @@ namespace osu.Game.Screens.Edit.Compose.Components private void applyRotation(bool shouldSnap) { float newRotation = shouldSnap ? snap(rawCumulativeRotation, snap_step) : MathF.Round(rawCumulativeRotation); - newRotation = (newRotation - 180) % 360 + 180; + newRotation = (newRotation + 360 + 180) % 360 - 180; + if (MathF.Abs(newRotation) == 180) + newRotation = 180; cumulativeRotation.Value = newRotation; From dc86b77f8077015bf62ee148585da3193f81cacf Mon Sep 17 00:00:00 2001 From: Nuno Pelagio Date: Mon, 19 May 2025 20:00:24 +0100 Subject: [PATCH 2/2] Fix ppy#32064: Fixed Formatting. --- .../Edit/Compose/Components/SelectionBoxRotationHandle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs index 3a1fcecc24..9b679a1344 100644 --- a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs +++ b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxRotationHandle.cs @@ -127,8 +127,8 @@ namespace osu.Game.Screens.Edit.Compose.Components private void applyRotation(bool shouldSnap) { float newRotation = shouldSnap ? snap(rawCumulativeRotation, snap_step) : MathF.Round(rawCumulativeRotation); - newRotation = (newRotation + 360 + 180) % 360 - 180; - if (MathF.Abs(newRotation) == 180) + newRotation = ((newRotation + 360 + 180) % 360) - 180; + if (MathF.Abs(newRotation) == 180) newRotation = 180; cumulativeRotation.Value = newRotation;