From d2343dde8260962ebf42024ca5f31fde53017986 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Wed, 11 Feb 2026 03:07:31 +0100 Subject: [PATCH] invert --- interfaces/Crafter.Math-Vector.cppm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interfaces/Crafter.Math-Vector.cppm b/interfaces/Crafter.Math-Vector.cppm index e961638..d7ec465 100755 --- a/interfaces/Crafter.Math-Vector.cppm +++ b/interfaces/Crafter.Math-Vector.cppm @@ -286,6 +286,12 @@ namespace Crafter { } } + constexpr void Invert() { + for(std::uint32_t i = 0; i < Len; i++) { + this->v[i] = -this->v[i]; + } + } + constexpr float Length() const { float Result = LengthSq(); return std::sqrtf(Result);