AutoMovie API
    Preparing search index...

    Fresh mutable factors with input rotation = swing * twist under the unit-rotation and usable-axis premises. The twist axis is expressed in the same frame as the input and normalized internally; inputs are not changed. No finite/unit input gate runs here.

    Projection length hypot(dot(rotation.xyz, normalizedAxis), rotation.w) below 1e-12 chooses identity twist and copies the whole input into swing. This is a numerical near-degeneracy convention, not only an exact half-turn test.

    type IResult = {
        swing: IAutoMovieQuaternion;
        twist: IAutoMovieQuaternion;
    }
    Index

    Residual orientation after removing twist on the right; near degeneracy copies the input rotation.

    Rotation about the supplied axis; identity when projected quaternion length is below 1e-12.