Browse Source

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

C#: Fix `Rotated` and `RotatedLocal`
Rémi Verschelde 2 years ago
parent
commit
ab70b6ca8a
1 changed files with 2 additions and 2 deletions
  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>