Vector.transformed

Vector.transformed(T)[source]

Return a transformed copy of this vector.

Parameters:
Tcompas.geometry.Transformation | list[list[float]]

The transformation.

Returns:
compas.geometry.Vector

The transformed copy.

Examples

>>> from compas.geometry import Rotation
>>> u = Vector(1.0, 0.0, 0.0)
>>> R = Rotation.from_axis_and_angle([0.0, 0.0, 1.0], math.radians(90))
>>> v = u.transformed(R)
>>> print(v)
Vector(x=0.000, y=1.000, z=0.000)