warp.quat_twist_angle#
- warp.quat_twist_angle(axis: vec3f, q: quatf) float[source]#
Return the unsigned twist magnitude in radians of
qaroundaxis.This discards the sign of the twist, so rotations by
+thetaand-thetaaroundaxisreturn the same value. Usequat_twist_angle_signed()when the direction of rotation aroundaxismatters.- Parameters:
axis – Twist axis, with unit length.
q – Rotation quaternion.
- Returns:
Unsigned twist angle in radians, in
[0, pi]ifq[3] >= 0and in(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: