File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -175,15 +175,10 @@ float Rect::getMinY() const
175
175
176
176
bool Rect::containsPoint (const Vec2& point) const
177
177
{
178
- bool bRet = false ;
179
-
180
- if (point.x >= getMinX () && point.x <= getMaxX ()
181
- && point.y >= getMinY () && point.y <= getMaxY ())
182
- {
183
- bRet = true ;
184
- }
185
-
186
- return bRet;
178
+ return (point.x >= getMinX () &&
179
+ point.x <= getMaxX () &&
180
+ point.y >= getMinY () &&
181
+ point.y <= getMaxY ());
187
182
}
188
183
189
184
bool Rect::intersectsRect (const Rect& rect) const
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ class CC_DLL Rect
190
190
*/
191
191
bool equals (const Rect& rect) const ;
192
192
/* *
193
- Check if the points is contained in the rect.
193
+ Check if the points is contained inclusively in the rect.
194
194
* @js NA
195
195
*/
196
196
bool containsPoint (const Vec2& point) const ;
You can’t perform that action at this time.
0 commit comments