code: public static DMatrix2x2 convert(DMatrixRMaj input , DMatrix2x2 output ) {
          if( output == null)
              output = new DMatrix2x2();
  
          if( input.getNumRows() != output.getNumRows() )
              throw new IllegalArgumentException("Number of rows do not match");
          if( input.getNumCols() != output.getNumCols() )
              throw new IllegalArgumentException("Number of columns do not match");
  
          output.a11 = input.data[0];
          output.a12 = input.data[1];
          output.a21 = input.data[2];
          output.a22 = input.data[3];
  
          return output;
      }
docs: Converts {@link DMatrixRMaj} into {@link DMatrix2x2}
  
  @param input Input matrix.
  @param output Output matrix.  If null a new matrix will be declared.
  @return Converted matrix.