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; } + /// <summary> + /// Turns this <see cref="Vector2"/> to an angle in radians. + /// </summary> + public float Angle() + { + return MathF.Atan2(Y, X); + } + /// <summary> /// Returns a <see cref="String"/> representation of this <see cref="Vector2"/> in the format: /// {X:[<see cref="X"/>] Y:[<see cref="Y"/>]}