Skip to content

Truly independent web browser

LibGfx: Remove unused matrix helpers

Aliaksandr Kalenikcafc7d867af6
diff --git a/Libraries/LibGfx/Matrix.h b/Libraries/LibGfx/Matrix.h
index e368d012175..1224a790c74 100644
--- a/Libraries/LibGfx/Matrix.h
+++ b/Libraries/LibGfx/Matrix.h
@@ -202,18 +202,6 @@ public:
return result;
}
- template<size_t U>
- [[nodiscard]] constexpr Matrix<U, T> submatrix_from_topleft() const
- requires(U > 0 && U < N)
- {
- Matrix<U, T> result;
- for (size_t i = 0; i < U; ++i) {
- for (size_t j = 0; j < U; ++j)
- result[i, j] = (*this)[i, j];
- }
- return result;
- }
-
constexpr bool is_invertible() const
{
return determinant() != static_cast<T>(0.0);
diff --git a/Libraries/LibGfx/Matrix4x4.h b/Libraries/LibGfx/Matrix4x4.h
index e909e815d47..23a9d7b6dbb 100644
--- a/Libraries/LibGfx/Matrix4x4.h
+++ b/Libraries/LibGfx/Matrix4x4.h
@@ -28,17 +28,6 @@ constexpr static Vector4<T> operator*(Matrix4x4<T> const& m, Vector4<T> const& v
v.x() * m[3, 0] + v.y() * m[3, 1] + v.z() * m[3, 2] + v.w() * m[3, 3]);
}
-// FIXME: this is a specific Matrix4x4 * Vector3 interaction that implies W=1; maybe move this out of LibGfx
-// or replace a Matrix4x4 * Vector4 operation?
-template<typename T>
-constexpr static Vector3<T> transform_point(Matrix4x4<T> const& m, Vector3<T> const& p)
-{
- return Vector3<T>(
- p.x() * m[0, 0] + p.y() * m[0, 1] + p.z() * m[0, 2] + m[0, 3],
- p.x() * m[1, 0] + p.y() * m[1, 1] + p.z() * m[1, 2] + m[1, 3],
- p.x() * m[2, 0] + p.y() * m[2, 1] + p.z() * m[2, 2] + m[2, 3]);
-}
-
template<typename T>
constexpr static Matrix4x4<T> translation_matrix(Vector3<T> const& p)
{