From 6268f3ca09afef812cf288f323cacff22fbfcffc Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 4 Apr 2019 23:08:22 +0800 Subject: Finish refactor!!! --- include/cru/platform/matrix.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/cru/platform/matrix.hpp') 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, -- cgit v1.2.3