浏览代码

Merge pull request #72325 from raulsntos/dotnet/fix-72321

C#: Fix `Rotated` and `RotatedLocal`
Rémi Verschelde 2 年之前
父节点
当前提交
ab70b6ca8a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs

+ 2 - 2
modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs

@@ -271,7 +271,7 @@ namespace Godot
         /// <returns>The rotated transformation matrix.</returns>
         /// <returns>The rotated transformation matrix.</returns>
         public readonly Transform2D Rotated(real_t angle)
         public readonly Transform2D Rotated(real_t angle)
         {
         {
-            return this * new Transform2D(angle, new Vector2());
+            return new Transform2D(angle, new Vector2()) * this;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -283,7 +283,7 @@ namespace Godot
         /// <returns>The rotated transformation matrix.</returns>
         /// <returns>The rotated transformation matrix.</returns>
         public readonly Transform2D RotatedLocal(real_t angle)
         public readonly Transform2D RotatedLocal(real_t angle)
         {
         {
-            return new Transform2D(angle, new Vector2()) * this;
+            return this * new Transform2D(angle, new Vector2());
         }
         }
 
 
         /// <summary>
         /// <summary>