warp.quat_twist_angle_signed#
- warp.quat_twist_angle_signed(axis: vec3f, q: quatf) float#
Kernel
Differentiable
Return the signed twist angle of
qaroundaxis.Unlike
quat_twist_angle(), this preserves the sign of the twist, so rotations by+thetaand-thetaaroundaxisreturn opposite values.The result follows the quaternion branch supplied by
q. Sinceqand-qrepresent the same orientation but different quaternion branches, they may produce signed angles that differ by2*pi.- Parameters:
axis – Twist axis. Expected to be normalized by the caller.
q – Input quaternion in
(x, y, z, w)layout.
- Returns:
Signed twist angle in radians in
[-2*pi, 2*pi].- Return type: