diff --git a/src/Math/Vector2.cs b/src/Math/Vector2.cs index 3075166..b247ae0 100644 --- a/src/Math/Vector2.cs +++ b/src/Math/Vector2.cs @@ -204,6 +204,14 @@ namespace MoonWorks.Math Y *= val; } + /// + /// Turns this to an angle in radians. + /// + public float Angle() + { + return MathF.Atan2(Y, X); + } + /// /// Returns a representation of this in the format: /// {X:[] Y:[]}