mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
patch
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Created by vlad on 10/28/23.
|
// Created by vlad on 10/28/23.
|
||||||
//
|
//
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
#include <uml/Vector3.h>
|
#include <uml/Vector3.h>
|
||||||
@@ -104,9 +105,9 @@ namespace uml
|
|||||||
|
|
||||||
Vector3 &Vector3::Abs()
|
Vector3 &Vector3::Abs()
|
||||||
{
|
{
|
||||||
x = fabsf(x);
|
x = std::abs(x);
|
||||||
y = fabsf(y);
|
y = std::abs(y);
|
||||||
z = fabsf(z);
|
z = std::abs(z);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -129,7 +130,7 @@ namespace uml
|
|||||||
|
|
||||||
float Vector3::Length() const
|
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
|
float Vector3::LengthSqr() const
|
||||||
@@ -139,7 +140,7 @@ namespace uml
|
|||||||
|
|
||||||
float Vector3::Length2D() const
|
float Vector3::Length2D() const
|
||||||
{
|
{
|
||||||
return sqrt(x * x + y * y);
|
return std::sqrt(x * x + y * y);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user