rotate#

Vector.rotate(angle_rad, axis)[source]#

Rotate a vector by angle_rad around axis

Rotates counter-clockwise in a right-handed coordinate system, where the axis around which is rotated points towards the obsorver.

Parameters:
angle_radfloat

The rotation angle in radian.

axisVector

The axis around which the vector is rotated.

E.g., axis = Vector(0, 0, 1) will rotate the vector around the z-axis, that is, within the xy-plane.

So far, axis must be along x, y, or z-direction.

Returns:
rotated_vectorVector