This involved extending the algorithm to loop over N states, where N=2 for the double rotor and N=1
for all other models. To handle the rotations being about the x and y-axes, an axis permutation
algorithm is used to shift these axes to z prior to decomposing to the torsion-tilt angles. The
reverse permutation is used to shift the axes back after correcting for being outside of the allowed
angles.