mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
C#: reverse Vector2.AngleToPoint
This commit is contained in:
parent
f7cf9fb148
commit
e9ace71c88
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user