@@ -97,11 +97,11 @@ extern const Color32 Color32_NULL;
9797using Point = glm::ivec2;
9898
9999// defines rectangle in 2d space
100- struct Rectangle
100+ struct Rect
101101{
102102public:
103- Rectangle () = default ;
104- Rectangle (int posx, int posy, int sizex, int sizey)
103+ Rect () = default ;
104+ Rect (int posx, int posy, int sizex, int sizey)
105105 : x(posx)
106106 , y(posy)
107107 , w(sizex)
@@ -130,9 +130,9 @@ struct Rectangle
130130 point.y < (y + h - 1 );
131131 }
132132 // get union area of two rectangles
133- inline Rectangle GetUnion (const Rectangle & rc) const
133+ inline Rect GetUnion (const Rect & rc) const
134134 {
135- Rectangle rcOutput;
135+ Rect rcOutput;
136136
137137 int maxx = glm::max (x + w, rc.x + rc.w );
138138 int maxy = glm::max (y + h, rc.y + rc.h );
@@ -145,9 +145,9 @@ struct Rectangle
145145 return rcOutput;
146146 }
147147 // get intersection area of two rectangles
148- inline Rectangle GetIntersection (const Rectangle & rc) const
148+ inline Rect GetIntersection (const Rect & rc) const
149149 {
150- Rectangle rcOutput;
150+ Rect rcOutput;
151151
152152 int minx = glm::min (x + w, rc.x + rc.w );
153153 int miny = glm::min (y + h, rc.y + rc.h );
@@ -164,12 +164,12 @@ struct Rectangle
164164 int w, h;
165165};
166166
167- inline bool operator == (const Rectangle & lhs, const Rectangle & rhs)
167+ inline bool operator == (const Rect & lhs, const Rect & rhs)
168168{
169169 return (lhs.x == rhs.x ) && (lhs.y == rhs.y ) && (lhs.w == rhs.w ) && (lhs.h == rhs.h );
170170}
171171
172- inline bool operator != (const Rectangle & lhs, const Rectangle & rhs)
172+ inline bool operator != (const Rect & lhs, const Rect & rhs)
173173{
174174 return (lhs.x != rhs.x ) || (lhs.y != rhs.y ) || (lhs.w != rhs.w ) || (lhs.h != rhs.h );
175175}
0 commit comments