From 6e22c1058929a24ec38362b9a96c2e00233185e7 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 7 May 2024 02:12:16 +0300 Subject: [PATCH] patch --- source/Vector3.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/Vector3.cpp b/source/Vector3.cpp index 0be8556..a27cd0b 100644 --- a/source/Vector3.cpp +++ b/source/Vector3.cpp @@ -1,6 +1,7 @@ // // Created by vlad on 10/28/23. // + #define _USE_MATH_DEFINES #include @@ -104,9 +105,9 @@ namespace uml Vector3 &Vector3::Abs() { - x = fabsf(x); - y = fabsf(y); - z = fabsf(z); + x = std::abs(x); + y = std::abs(y); + z = std::abs(z); return *this; } @@ -129,7 +130,7 @@ namespace uml float Vector3::Length() const { - return sqrt(x * x + y * y + z * z); + return std::sqrt(x * x + y * y + z * z); } float Vector3::LengthSqr() const @@ -139,7 +140,7 @@ namespace uml float Vector3::Length2D() const { - return sqrt(x * x + y * y); + return std::sqrt(x * x + y * y); }