double Line::GetInnerAngleDeg(const Line& ref) const { double diff; diff = fabs( GetAngleDeg() - ref.GetAngleDeg() ); while ( diff > 180 ) diff -= 180; if ( diff > 90 ) diff = 180 - diff; return diff; }
//-------------------------------------------------------------------- Rmatrix33 Joint::GetMatrix () const // Returns the rotation matrix for all the turns in a joint combined { //Rmatrix33 out = new Rmatrix33(true); Rmatrix33 out = Rmatrix33(true); for (Integer jx=0; jx<=3-1; ++jx) if (Use[jx]) { Rmatrix33 qq = AttitudeConversionUtility::EulerAxisAndAngleToDCM (Axis[jx],GetAngleDeg(jx)); out = qq*out; } return out; }