From d16d145ced0aa7ddfe98be9c0ce1aea2aad7d5f0 Mon Sep 17 00:00:00 2001 From: zacoons Date: Thu, 4 Jun 2026 20:45:00 +1000 Subject: [PATCH] math: minor improvement to Mat3x3.translate --- src/math/Mat3x3.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/math/Mat3x3.cpp b/src/math/Mat3x3.cpp index b91cf1e..2ba0f41 100644 --- a/src/math/Mat3x3.cpp +++ b/src/math/Mat3x3.cpp @@ -109,7 +109,8 @@ Mat3x3& Mat3x3::scale(const float scale_) { } Mat3x3& Mat3x3::translate(const Vector2D& offset) { - multiply(std::array{1.0f, 0.0f, sc(offset.x), 0.0f, 1.0f, sc(offset.y), 0.0f, 0.0f, 1.0f}); + matrix[2] += offset.x; + matrix[5] += offset.y; return *this; }