warp.quat_twist_angle_signed#
- warp.quat_twist_angle_signed(axis: vec3f, q: quatf) float[source]#
Return the signed twist angle in radians of
qaroundaxis.Unlike
quat_twist_angle(), this preserves the sign of the twist, so rotations by+thetaand-thetaaroundaxisreturn opposite values. Positive angles follow the right-hand rule aboutaxis.- Parameters:
axis – Twist axis, with unit length.
q – Rotation quaternion.
- Returns:
Signed twist angle in radians, in
[-pi, pi]ifq[3] >= 0and in[-2*pi, 2*pi]otherwise, soqand-qcan return different angles even though they represent the same rotation. It is unspecified whenqis a rotation of 180 degrees about an axis perpendicular toaxis.- Return type: