summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-08-27 22:32:20 +0200
committerGitHub <noreply@github.com>2016-08-27 22:32:20 +0200
commit3cc08ab1f125820d78b9917998ff09f81b052918 (patch)
treea3d26570a8f35daca3e1d08063e613ac51fac90f
parentf3b2c217c640071b6874101f819a857dabb80e20 (diff)
parent3578800230c65a34b1cd3c5bb576a6dc6e4bbbdd (diff)
Merge pull request #6270 from neikeq/pr-m32-ctor
Matrix32: Add a constructor which takes six real_t params
-rw-r--r--core/math/math_2d.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index fbf700fb9c..90aae9fe50 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -618,6 +618,15 @@ struct Matrix32 {
operator String() const;
+ Matrix32(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy) {
+
+ elements[0][0] = xx;
+ elements[0][1] = xy;
+ elements[1][0] = yx;
+ elements[1][1] = yy;
+ elements[2][0] = ox;
+ elements[2][1] = oy;
+ }
Matrix32(real_t p_rot, const Vector2& p_pos);
Matrix32() { elements[0][0]=1.0; elements[1][1]=1.0; }