mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added vector2 based constructors to rect2.
This commit is contained in:
parent
a723d748a7
commit
e9250d185f
@ -205,3 +205,10 @@ Rect2::Rect2(const float rx, const float ry, const float rw, const float rh) {
|
||||
w = rw;
|
||||
h = rh;
|
||||
}
|
||||
|
||||
Rect2::Rect2(const Vector2 &position, const Vector2 &size) {
|
||||
x = position.x;
|
||||
y = position.y;
|
||||
w = size.x;
|
||||
h = size.y;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
Rect2(const Rect2 &b);
|
||||
Rect2(const float rx, const float ry);
|
||||
Rect2(const float rx, const float ry, const float rw, const float rh);
|
||||
Rect2(const Vector2 &position, const Vector2 &size);
|
||||
|
||||
float x;
|
||||
float y;
|
||||
|
Loading…
Reference in New Issue
Block a user