Path: Common/Quaternion
% Finds the quaternion that aligns a unit vector with a second vector. Type U2Q for a demo. -------------------------------------------------------------------------- Form: q = U2Q( u, v ) -------------------------------------------------------------------------- ------ Inputs ------ u (3,:) Vector v (3,:) Where vector is after rotation ------- Outputs ------- q (4,:) Quaternion that rotates u into v --------------------------------------------------------------------------