Calculate the intersection of this rectangle and another rectangle.

        Args:
            other (Rect): The other rectangle.

        Returns:
            Rect: The intersection of this rectangle and the given other rectangle, or None if there is no such
                intersection.

def intersect(self, other):
        """Calculate the intersection of this rectangle and another rectangle.

        Args:
            other (Rect): The other rectangle.

        Returns:
            Rect: The intersection of this rectangle and the given other rectangle, or None if there is no such
                intersection.
        """
        intersection = Rect()
        if lib.SDL_IntersectRect(self._ptr, self._ptr, intersection._ptr):
            return intersection
        else:
            return None