diff options
author | Hendiadyoin1 <leon2002.la@gmail.com> | 2021-07-17 18:29:28 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-07-19 16:34:21 +0430 |
commit | ed46d52252375be732841d980f9eec02ea7691f5 (patch) | |
tree | 60c8ff281cb3a07e2a33629184c6c0aec2a7f528 /Userland/Libraries/LibGfx/Vector3.h | |
parent | c5f6ba6e71ee7ebce578828fd35ba119e9a6b41a (diff) | |
download | serenity-ed46d52252375be732841d980f9eec02ea7691f5.zip |
Everywhere: Use AK/Math.h if applicable
AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.
Also clean up some stale math includes and improper floatingpoint usage.
Diffstat (limited to 'Userland/Libraries/LibGfx/Vector3.h')
-rw-r--r-- | Userland/Libraries/LibGfx/Vector3.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Vector3.h b/Userland/Libraries/LibGfx/Vector3.h index 6f6c41d0c7..0e17d2721e 100644 --- a/Userland/Libraries/LibGfx/Vector3.h +++ b/Userland/Libraries/LibGfx/Vector3.h @@ -6,8 +6,8 @@ #pragma once +#include <AK/Math.h> #include <AK/String.h> -#include <math.h> namespace Gfx { template<typename T> @@ -121,7 +121,7 @@ public: constexpr T length() const { - return sqrt(m_x * m_x + m_y * m_y + m_z * m_z); + return AK::sqrt(m_x * m_x + m_y * m_y + m_z * m_z); } String to_string() const |