diff options
| author | Léo Lam <leo@leolam.fr> | 2022-03-24 00:07:11 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-03-24 00:40:27 +0100 |
| commit | cb6b94aab43c5396716c38376c7f3bd0047e5ad0 (patch) | |
| tree | e637874090e010509f4d42a4eb52ebbc7f69c0fe /lib | |
| parent | 0b636cdd02e9804bfbcab507f3430b8d9b445638 (diff) | |
math/Matrix: Add operator* for Matrix34 multiplication
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sead/include/math/seadMatrix.h | 14 |
1 files changed, 14 insertions, 0 deletions
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(); |
