vecrec.cast_anything_to_rectangle
- vecrec.cast_anything_to_rectangle(input)[source]
Convert the given input to a rectangle if possible, otherwise raise a
RectCastError. The following types can be converted to a rectangle:Shape, or anything implementing that interface (seecast_shape_to_rectangle()).Vector, or anything that can be coverted into a vector (seecast_anything_to_vector()). The resulting rectangle will have zero area.