From adfa6c6ba0667737a753a95d79eb158b3243a5ed Mon Sep 17 00:00:00 2001 From: Syntriax Date: Mon, 9 Jun 2025 18:04:41 +0300 Subject: [PATCH] feat: Vector2D.Reversed property added --- Engine.Core/Primitives/Vector2D.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Engine.Core/Primitives/Vector2D.cs b/Engine.Core/Primitives/Vector2D.cs index 183c13f..0d69f05 100644 --- a/Engine.Core/Primitives/Vector2D.cs +++ b/Engine.Core/Primitives/Vector2D.cs @@ -31,6 +31,11 @@ public readonly struct Vector2D(float x, float y) /// public float MagnitudeSquared => LengthSquared(this); + /// + /// Gets a with the direction reversed. + /// + public readonly Vector2D Reversed => -this; + /// /// The normalized form of the (a with the same direction and a magnitude of 1). ///