warp.quat\_twist ================ .. currentmodule:: warp._src.lang .. function:: quat_twist(axis: vec3f, q: quatf) -> quatf .. wp-function-tags:: :kernel: true :python: true :differentiable: true :source: https://github.com/NVIDIA/warp/blob/release-1.18/warp/_src/math.py#L151-L168 Extract the twist quaternion of ``q`` around ``axis``. This performs a swing-twist decomposition and returns the component of rotation in ``q`` whose rotation axis is parallel to ``axis``. :param axis: Twist axis (expected to be normalized). :param q: Input quaternion in ``(x, y, z, w)`` layout. :returns: Unit twist quaternion. :rtype: warp.quat