summaryrefslogtreecommitdiffstats
path: root/Common/interface
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-29 04:33:30 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-29 04:33:30 +0000
commit7515fd74c2b0fd7c028276701fb96f9219508655 (patch)
tree20fe7a02593e2234c1d6fa47f63423c420c408b6 /Common/interface
parentUpdated Quaternion functions in math lib (diff)
downloadDiligentCore-7515fd74c2b0fd7c028276701fb96f9219508655.tar.gz
DiligentCore-7515fd74c2b0fd7c028276701fb96f9219508655.zip
Added matrix operator *= to math lib
Diffstat (limited to 'Common/interface')
-rw-r--r--Common/interface/BasicMath.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Common/interface/BasicMath.h b/Common/interface/BasicMath.h
index 1a0752ef..ad1bc8cb 100644
--- a/Common/interface/BasicMath.h
+++ b/Common/interface/BasicMath.h
@@ -682,6 +682,11 @@ template <class T> struct Matrix2x2
return *this;
}
+ Matrix2x2& operator *= (const Matrix2x2& right)
+ {
+ *this = Mul(*this, right);
+ return *this;
+ }
Matrix2x2 Transpose()const
{
@@ -807,6 +812,12 @@ template <class T> struct Matrix3x3
return *this;
}
+ Matrix3x3& operator *= (const Matrix3x3& right)
+ {
+ *this = Mul(*this, right);
+ return *this;
+ }
+
Matrix3x3 Transpose()const
{
return Matrix3x3
@@ -944,6 +955,12 @@ template <class T> struct Matrix4x4
return *this;
}
+ Matrix4x4& operator *= (const Matrix4x4& right)
+ {
+ *this = Mul(*this, right);
+ return *this;
+ }
+
Matrix4x4 Transpose()const
{
return Matrix4x4