x <= p.x < (rect.x + rect.width) y <= p.y < (rect.y + rect.height)