diff options
author | Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com> | 2022-12-24 17:22:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-24 17:22:50 +0100 |
commit | f382a2b59bb9606f958ccaf7be7ac98f45607c9f (patch) | |
tree | 92e127c8b0b163ed2a8c3a014e58a6444638968d | |
parent | 9f1fe0895531706c017bc9ec35184358c3e7a17c (diff) | |
parent | e9ace71c886ef5c3ba940b0267de160a48936a51 (diff) |
Merge pull request #70509 from irwiss/reverse-Vector2.AngleToPoint
C#: reverse Vector2.AngleToPoint
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs | 2 | ||||
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs index c471eceded..4c60080ee9 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2.cs @@ -139,7 +139,7 @@ namespace Godot /// <returns>The angle between the two vectors, in radians.</returns> public readonly real_t AngleToPoint(Vector2 to) { - return Mathf.Atan2(y - to.y, x - to.x); + return Mathf.Atan2(to.y - y, to.x - x); } /// <summary> diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs index 08f2a3a8af..91be548a21 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Vector2i.cs @@ -123,7 +123,7 @@ namespace Godot /// <returns>The angle between the two vectors, in radians.</returns> public readonly real_t AngleToPoint(Vector2i to) { - return Mathf.Atan2(y - to.y, x - to.x); + return Mathf.Atan2(to.y - y, to.x - x); } /// <summary> |