feat: Vector2D.Reversed property added

This commit is contained in:
Syntriax 2025-06-09 18:04:41 +03:00
parent a53766f472
commit adfa6c6ba0

View File

@ -31,6 +31,11 @@ public readonly struct Vector2D(float x, float y)
/// </summary>
public float MagnitudeSquared => LengthSquared(this);
/// <summary>
/// Gets a <see cref="Vector2D"/> with the direction reversed.
/// </summary>
public readonly Vector2D Reversed => -this;
/// <summary>
/// The normalized form of the <see cref="Vector2D"/> (a <see cref="Vector2D"/> with the same direction and a magnitude of 1).
/// </summary>