1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +00:00

Merge pull request #70509 from irwiss/reverse-Vector2.AngleToPoint

C#: reverse Vector2.AngleToPoint
This commit is contained in:
Ignacio Roldán Etcheverry
2022-12-24 17:22:50 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -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>

View File

@@ -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>