code: public static DMatrixRMaj orthogonal(int numRows , int numCols , Random rand ) {
          if( numRows < numCols ) {
              throw new IllegalArgumentException("The number of rows must be more than or equal to the number of columns");
          }
  
          DMatrixRMaj u[] = span(numRows,numCols,rand);
  
          DMatrixRMaj ret = new DMatrixRMaj(numRows,numCols);
          for( int i = 0; i < numCols; i++ ) {
              SubmatrixOps_DDRM.setSubMatrix(u[i], ret, 0, 0, 0, i, numRows, 1);
          }
  
          return ret;
      }
docs: <p>
  Creates a random orthogonal or isometric matrix, depending on the number of rows and columns.
  The number of rows must be more than or equal to the number of columns.
  </p>
  
  @param numRows Number of rows in the generated matrix.
  @param numCols Number of columns in the generated matrix.
  @param rand Random number generator used to create matrices.
  @return A new isometric matrix.