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

        Args:
            other (Rect): The other rectangle.

        Returns:
            Rect: The union of this rectangle and the given other rectangle.
        """
        union = Rect()
        lib.SDL_UnionRect(self._ptr, other._ptr, union._ptr)
        return union