[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] bug in Rect.collidepoint?
hi folks,
The function Rect.collidepoint return true if a point is inside or on
the border of a rect, but the source of this function says:
inside = x >= self->r.x &&
x < self->r.x+self->r.w &&
y >= self->r.y &&
y < self->r.y+self->r.h;
Both in the second and in the fourth lines is written "<" instead of
"<=", this mean that this function will return true only if the point in
on top or on left border, not for bottom and right IMHO.
see you