math/Matrix: Add operator* for Matrix34 multiplication

This commit is contained in:
Léo Lam 2022-03-24 00:07:11 +01:00
parent 0b636cdd02
commit cb6b94aab4
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 14 additions and 0 deletions

View File

@ -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();