From 54a24fe45ac93eeceb9e427d3306b1d2176d812b Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 8 May 2022 22:13:23 +0200 Subject: [PATCH] LibGfx: Use `AK::round_to` for `VectorN::to_rounded` --- Userland/Libraries/LibGfx/VectorN.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibGfx/VectorN.h b/Userland/Libraries/LibGfx/VectorN.h index 7d57e4ce65..a06d7019c6 100644 --- a/Userland/Libraries/LibGfx/VectorN.h +++ b/Userland/Libraries/LibGfx/VectorN.h @@ -239,12 +239,8 @@ public: { VectorN result; UNROLL_LOOP - for (auto i = 0u; i < N; ++i) { - if constexpr (IsSame) - result.data()[i] = static_cast(lrintf(m_data[i])); - else - result.data()[i] = static_cast(lrint(m_data[i])); - } + for (auto i = 0u; i < N; ++i) + result.data()[i] = round_to(m_data[i]); return result; }