docs: public static double qualityTriangular(ZMatrixRMaj T)
      {
          int N = Math.min(T.numRows,T.numCols);
  
          double max = elementDiagMaxMagnitude2(T);
  
          if( max == 0.0 )
              return 0.0;
  
          max = Math.sqrt(max);
          int rowStride = T.getRowStride();
  
          double qualityR = 1.0;
          double qualityI = 0.0;
  
          for( int i = 0; i < N; i++ ) {
              int index = i*rowStride + i*2;
  
              double real = T.data[index]/max;
              double imaginary = T.data[index]/max;
  
              double r = qualityR*real - qualityI*imaginary;
              double img = qualityR*imaginary + real*qualityI;
  
              qualityR = r;
              qualityI = img;
          }
  
          return Math.sqrt(qualityR*qualityR + qualityI*qualityI);
      }