From cb6b94aab43c5396716c38376c7f3bd0047e5ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 24 Mar 2022 00:07:11 +0100 Subject: [PATCH] math/Matrix: Add operator* for Matrix34 multiplication --- lib/sead/include/math/seadMatrix.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/sead/include/math/seadMatrix.h b/lib/sead/include/math/seadMatrix.h index 19d31a8e..8de9df7d 100644 --- a/lib/sead/include/math/seadMatrix.h +++ b/lib/sead/include/math/seadMatrix.h @@ -131,8 +131,22 @@ public: bool setInverse(const Self& n); bool setInverse33(const Self& n); bool setInverseTranspose(const Self& n); + + friend Self operator*(const Self& lhs, const Self& rhs) + { + Self result; + result.setMul(lhs, rhs); + return result; + } + friend Self operator*(const Mtx33& lhs, const Self& rhs) + { + Self result; + result.setMul(lhs, rhs); + return result; + } void setMul(const Self& a, const Self& b); void setMul(const Mtx33& a, const Self& b); + void setTranspose(const Self& n); void transpose();