Fix computeInverseAndDetWithCheck for dynamic result matrices
Summary
- Resize the inverse output matrix before computing, so that passing a dynamic-sized matrix (e.g.
MatrixXd) as the result of a fixed-size source (e.g.Matrix3d) works correctly instead of failing at runtime - Add
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZEto catch incompatible fixed-size mismatches at compile time - Remove redundant assertion from
computeInverseWithCheck(already checked in the delegated call) - Add tests verifying dynamic result matrices are correctly resized for both
computeInverseAndDetWithCheckandcomputeInverseWithCheck
Closes #2917 (closed)