diff options
| author | Silc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com> | 2023-11-10 21:29:45 +0900 |
|---|---|---|
| committer | Silc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com> | 2023-11-16 21:37:18 +0900 |
| commit | 80c9533810de435ba0b7ed5d7a0d5ae0f8e95e55 (patch) | |
| tree | eb322f1367027235ce6a38e9661a522a9f4ca464 /core/math | |
| parent | d5217b68db68d52a2f393e935fb38dde6a0f802a (diff) | |
| download | redot-engine-80c9533810de435ba0b7ed5d7a0d5ae0f8e95e55.tar.gz | |
Rework blending method in Variant animation for Int/Array/String
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/rect2.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/rect2.h b/core/math/rect2.h index 6ccb76cd10..5f403458fd 100644 --- a/core/math/rect2.h +++ b/core/math/rect2.h @@ -285,6 +285,10 @@ struct _NO_DISCARD_ Rect2 { return Rect2(Point2(position.x + MIN(size.x, (real_t)0), position.y + MIN(size.y, (real_t)0)), size.abs()); } + _FORCE_INLINE_ Rect2 round() const { + return Rect2(position.round(), size.round()); + } + Vector2 get_support(const Vector2 &p_normal) const { Vector2 half_extents = size * 0.5f; Vector2 ofs = position + half_extents; |
