vecrec.cast_anything_to_vector
- vecrec.cast_anything_to_vector(input)[source]
Convert the given input to a vector if possible, otherwise raise a
VectorCastError
. The following types can be converted to a vector:Vector
(in which case the input will be returned unchanged).Iterable with exactly two elements.
Object with x and y attributes.