diff --git a/Userland/Libraries/LibGfx/Vector2.h b/Userland/Libraries/LibGfx/Vector2.h index 1868e8f8aa..2aa13136b2 100644 --- a/Userland/Libraries/LibGfx/Vector2.h +++ b/Userland/Libraries/LibGfx/Vector2.h @@ -60,12 +60,14 @@ public: return Vector2(m_x / other.m_x, m_y / other.m_y); } - constexpr Vector2 operator*(T f) const + template + constexpr Vector2 operator*(U f) const { return Vector2(m_x * f, m_y * f); } - constexpr Vector2 operator/(T f) const + template + constexpr Vector2 operator/(U f) const { return Vector2(m_x / f, m_y / f); } diff --git a/Userland/Libraries/LibGfx/Vector3.h b/Userland/Libraries/LibGfx/Vector3.h index c6485eecb5..d6888c241e 100644 --- a/Userland/Libraries/LibGfx/Vector3.h +++ b/Userland/Libraries/LibGfx/Vector3.h @@ -65,12 +65,14 @@ public: return Vector3(m_x / other.m_x, m_y / other.m_y, m_z / other.m_z); } - constexpr Vector3 operator*(T f) const + template + constexpr Vector3 operator*(U f) const { return Vector3(m_x * f, m_y * f, m_z * f); } - constexpr Vector3 operator/(T f) const + template + constexpr Vector3 operator/(U f) const { return Vector3(m_x / f, m_y / f, m_z / f); } diff --git a/Userland/Libraries/LibGfx/Vector4.h b/Userland/Libraries/LibGfx/Vector4.h index 53e9c7bc14..06accb44a1 100644 --- a/Userland/Libraries/LibGfx/Vector4.h +++ b/Userland/Libraries/LibGfx/Vector4.h @@ -70,12 +70,14 @@ public: return Vector4(m_x / other.m_x, m_y / other.m_y, m_z / other.m_z, m_w / other.m_w); } - constexpr Vector4 operator*(T f) const + template + constexpr Vector4 operator*(U f) const { return Vector4(m_x * f, m_y * f, m_z * f, m_w * f); } - constexpr Vector4 operator/(T f) const + template + constexpr Vector4 operator/(U f) const { return Vector4(m_x / f, m_y / f, m_z / f, m_w / f); }