Common: add determinant functions to Matrix33 and Matrix44

This commit is contained in:
iwubcode
2024-01-23 21:42:53 -06:00
parent 0b1087e9c9
commit b37f096f4b
2 changed files with 26 additions and 5 deletions

View File

@ -392,6 +392,7 @@ public:
static void Multiply(const Matrix33& a, const Vec3& vec, Vec3* result);
Matrix33 Inverted() const;
float Determinant() const;
Matrix33& operator*=(const Matrix33& rhs)
{
@ -432,6 +433,8 @@ public:
// For when a vec4 isn't needed a multiplication function that takes a Vec3 and w:
Vec3 Transform(const Vec3& point, float w) const;
float Determinant() const;
Matrix44& operator*=(const Matrix44& rhs)
{
Multiply(*this, rhs, this);