Skip to content

[Question] CCRect::containsPoint  #18680

@progsource

Description

@progsource
  • cocos2d-x version: v3

bool Rect::containsPoint(const Vec2& point) const
{
bool bRet = false;
if (point.x >= getMinX() && point.x <= getMaxX()
&& point.y >= getMinY() && point.y <= getMaxY())
{
bRet = true;
}
return bRet;
}

As issue #2423 was closed as far as I can see with somehow unrelated commits, I simply wanted to ask, if it is really wanted behavior to have an inclusive containsPoint method. My expectation would have been, that it should be exclusive.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions