From 449c60133c7eaf283d49fa7e7de07269cd839fec Mon Sep 17 00:00:00 2001 From: Orange Date: Sat, 3 May 2025 21:36:16 +0300 Subject: [PATCH] bugfix --- include/omath/vector2.hpp | 6 +++--- include/omath/vector3.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/omath/vector2.hpp b/include/omath/vector2.hpp index 9a512a2..915b1d3 100644 --- a/include/omath/vector2.hpp +++ b/include/omath/vector2.hpp @@ -134,14 +134,14 @@ namespace omath return len > 0.f ? *this / len : *this; } #else - [[nodiscard]] Type Length() const + [[nodiscard]] Type length() const { return std::hypot(x, y); } - [[nodiscard]] Vector2 Normalized() const + [[nodiscard]] Vector2 normalized() const { - const Type len = Length(); + const Type len = length(); return len > 0.f ? *this / len : *this; } #endif diff --git a/include/omath/vector3.hpp b/include/omath/vector3.hpp index 8f26609..d535168 100644 --- a/include/omath/vector3.hpp +++ b/include/omath/vector3.hpp @@ -149,19 +149,19 @@ namespace omath [[nodiscard]] Vector3 normalized() const { - const Type length = this->Length(); + const Type len = this->length(); - return length != 0 ? *this / length : *this; + return len != 0 ? *this / len : *this; } [[nodiscard]] Type length_2d() const { - return Vector2::Length(); + return Vector2::length(); } [[nodiscard]] Type distance_to(const Vector3& vOther) const { - return (*this - vOther).Length(); + return (*this - vOther).length(); } #endif