aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Etcheverry2016-08-24 18:54:23 +0200
committerRémi Verschelde2016-09-01 08:44:22 +0200
commitb1ea299edfac88da1add0a7ff7e717e3e6b8c49b (patch)
tree343b89e9a902e4821cfc252aaa89575816bb8099
parent103b04e529259a0b185501d7dbc18f24c3d81a7e (diff)
downloadgodot-b1ea299edfac88da1add0a7ff7e717e3e6b8c49b.tar.gz
godot-b1ea299edfac88da1add0a7ff7e717e3e6b8c49b.tar.zst
godot-b1ea299edfac88da1add0a7ff7e717e3e6b8c49b.zip
Matrix32: Add constructor that takes six real_t params
(cherry picked from commit 3578800230c65a34b1cd3c5bb576a6dc6e4bbbdd)
-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 fbf700fb9..90aae9fe5 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; }