diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-04-19 15:54:33 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-04-19 15:56:34 -0300 |
commit | 04847ef5f98d9a20a72286c44cc26302ec82dec5 (patch) | |
tree | 415be73cb62786cd514ce4220de2af64f9e07831 /core/math | |
parent | 8e652a1400ee20b99cf4829e8b4883fe3f254d59 (diff) |
Added ability for multiple images to be imported as an atlas
This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/transform_2d.cpp | 2 | ||||
-rw-r--r-- | core/math/transform_2d.h | 2 | ||||
-rw-r--r-- | core/math/vector2.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp index 7d00158f3d..1d0387bd45 100644 --- a/core/math/transform_2d.cpp +++ b/core/math/transform_2d.cpp @@ -106,7 +106,7 @@ Size2 Transform2D::get_scale() const { return Size2(elements[0].length(), det_sign * elements[1].length()); } -void Transform2D::set_scale(Size2 &p_scale) { +void Transform2D::set_scale(const Size2 &p_scale) { elements[0].normalize(); elements[1].normalize(); elements[0] *= p_scale.x; diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h index b9e7a36fb3..c44678674a 100644 --- a/core/math/transform_2d.h +++ b/core/math/transform_2d.h @@ -81,7 +81,7 @@ struct Transform2D { real_t basis_determinant() const; Size2 get_scale() const; - void set_scale(Size2 &p_scale); + void set_scale(const Size2 &p_scale); _FORCE_INLINE_ const Vector2 &get_origin() const { return elements[2]; } _FORCE_INLINE_ void set_origin(const Vector2 &p_origin) { elements[2] = p_origin; } diff --git a/core/math/vector2.h b/core/math/vector2.h index ae2d1ec660..9a214ef9b5 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -99,6 +99,7 @@ struct Vector2 { Vector2 operator/(const real_t &rvalue) const; void operator/=(const real_t &rvalue); + void operator/=(const Vector2 &rvalue) { *this = *this / rvalue; } Vector2 operator-() const; |