diff --git a/Game/Physics2D/Primitives/Vector2D.cs b/Game/Physics2D/Primitives/Vector2D.cs index 554c419..5c11b7b 100644 --- a/Game/Physics2D/Primitives/Vector2D.cs +++ b/Game/Physics2D/Primitives/Vector2D.cs @@ -2,7 +2,7 @@ using System; namespace Syntriax.Engine.Physics2D.Primitives; -[System.Diagnostics.DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)},nq}}")] +[System.Diagnostics.DebuggerDisplay("{ToString(),nq}, Length: {Magnitude}, LengthSquared: {MagnitudeSquared}, Normalized: {Normalized}")] public record Vector2D(float X, float Y) { public float Magnitude => Length(this); @@ -36,9 +36,5 @@ public record Vector2D(float X, float Y) public static float Angle(Vector2D left, Vector2D right) => MathF.Acos(Dot(left, right) / (Length(left) * Length(right))); public static float Dot(Vector2D left, Vector2D right) => left.X * right.X + left.Y * right.Y; - public override string ToString() => $"Vector2D({X}, {Y})"; - -#if DEBUG - private string GetDebuggerDisplay => $"{ToString()}, Length: {Length(this)}, LengthSquared: {LengthSquared(this)}, Normalized: {Normalize(this)}"; -#endif + public override string ToString() => $"{nameof(Vector2D)}({X}, {Y})"; }