aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/matrix.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-04-04 23:08:22 +0800
committercrupest <crupest@outlook.com>2019-04-04 23:08:22 +0800
commit6268f3ca09afef812cf288f323cacff22fbfcffc (patch)
tree86e89d3b4212ae069075f799a5278c120e258e73 /include/cru/platform/matrix.hpp
parentdbda5a8e4f0d59ad95be8fc3ee7b21e9122cc474 (diff)
downloadcru-6268f3ca09afef812cf288f323cacff22fbfcffc.tar.gz
cru-6268f3ca09afef812cf288f323cacff22fbfcffc.tar.bz2
cru-6268f3ca09afef812cf288f323cacff22fbfcffc.zip
Finish refactor!!!
Diffstat (limited to 'include/cru/platform/matrix.hpp')
-rw-r--r--include/cru/platform/matrix.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/cru/platform/matrix.hpp b/include/cru/platform/matrix.hpp
index e5e5cf42..37e4725e 100644
--- a/include/cru/platform/matrix.hpp
+++ b/include/cru/platform/matrix.hpp
@@ -1,3 +1,4 @@
+#pragma once
#include "cru/common/pre_config.hpp"
#include "cru/common/ui_base.hpp"
@@ -29,12 +30,14 @@ struct Matrix {
m31 == 0.0f && m32 == 0.0f;
}
- Matrix& operator*=(const Matrix& matrix) const {
+ Matrix& operator*=(const Matrix& matrix) {
*this = Product(*this, matrix);
return *this;
}
- Matrix operator*(const Matrix& matrix) const { return Product(this, matrix); }
+ Matrix operator*(const Matrix& matrix) const {
+ return Product(*this, matrix);
+ }
ui::Point TransformPoint(const ui::Point& point) const {
return ui::Point{point.x * m11 + point.y * m21 + m31,