warp.quat_twist_angle#
- warp.quat_twist_angle(axis: vec3f, q: quatf) float#
Kernel
Differentiable
Return the unsigned twist magnitude 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.The result follows the quaternion branch supplied by
q. For canonicalized quaternions, the result is in[0, pi]. Noncanonicalized inputs may return values in[0, 2*pi].- Parameters:
axis – Twist axis. Expected to be normalized by the caller.
q – Input quaternion.
- Returns:
Unsigned twist angle in radians.
- Return type: