From fa4e2b1d94654056d5bac56c96249952dd3d6b63 Mon Sep 17 00:00:00 2001 From: Orange Date: Thu, 30 Apr 2026 05:35:17 +0300 Subject: [PATCH] update --- include/omath/linear_algebra/vector2.hpp | 15 +-------------- include/omath/linear_algebra/vector3.hpp | 24 ------------------------ 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/include/omath/linear_algebra/vector2.hpp b/include/omath/linear_algebra/vector2.hpp index 4462239..d8009b4 100644 --- a/include/omath/linear_algebra/vector2.hpp +++ b/include/omath/linear_algebra/vector2.hpp @@ -129,8 +129,7 @@ namespace omath { return x * other.x + y * other.y; } - -#ifndef _MSC_VER + [[nodiscard]] constexpr Type length() const noexcept { return std::hypot(this->x, this->y); @@ -141,18 +140,6 @@ namespace omath const Type len = length(); return len > 0.f ? *this / len : *this; } -#else - [[nodiscard]] Type length() const noexcept - { - return std::hypot(x, y); - } - - [[nodiscard]] Vector2 normalized() const noexcept - { - const Type len = length(); - return len > static_cast(0) ? *this / len : *this; - } -#endif [[nodiscard]] constexpr Type length_sqr() const noexcept { return x * x + y * y; diff --git a/include/omath/linear_algebra/vector3.hpp b/include/omath/linear_algebra/vector3.hpp index 18f921b..3406bed 100644 --- a/include/omath/linear_algebra/vector3.hpp +++ b/include/omath/linear_algebra/vector3.hpp @@ -129,7 +129,6 @@ namespace omath return Vector2::dot(other) + z * other.z; } -#ifndef _MSC_VER [[nodiscard]] constexpr Type length() const { return std::hypot(this->x, this->y, z); @@ -149,29 +148,6 @@ namespace omath return length_value != 0 ? *this / length_value : *this; } -#else - [[nodiscard]] Type length() const noexcept - { - return std::hypot(this->x, this->y, z); - } - - [[nodiscard]] Vector3 normalized() const noexcept - { - const Type len = this->length(); - - return len != static_cast(0) ? *this / len : *this; - } - - [[nodiscard]] Type length_2d() const noexcept - { - return Vector2::length(); - } - - [[nodiscard]] Type distance_to(const Vector3& v_other) const noexcept - { - return (*this - v_other).length(); - } -#endif [[nodiscard]] constexpr Type length_sqr() const noexcept {