Hi there,
I have realized that when I create a rectangle isPointInRect() will return true even though it is false.
For instance:
This rectangle will always return true when using isPointInRect() when the point's y is within the rect but the x is bigger than what it is in the rect.
The point (220,230) will return true even though it is not within the rectangle.
Is this a bug or am I doing something wrong?
Thanks guys.
Edit: The y coordinate does not work either. If p.y is bigger than the y in the rect but the x is correct then it will also return true even though it isn't.
I have realized that when I create a rectangle isPointInRect() will return true even though it is false.
For instance:
- Code:
testRect.setRect(116,220,204,235);
This rectangle will always return true when using isPointInRect() when the point's y is within the rect but the x is bigger than what it is in the rect.
The point (220,230) will return true even though it is not within the rectangle.
- Code:
testRect.isPointInRect(p.x,p.y);
Is this a bug or am I doing something wrong?
Thanks guys.
Edit: The y coordinate does not work either. If p.y is bigger than the y in the rect but the x is correct then it will also return true even though it isn't.