packages/cafeteria/app/external/sylvester/scripts/sylvester-0.1.3.js
function() {
    if (!this.isSquare()) { return null; }
    var tr = this.elements[0][0], n = this.elements.length - 1, k = n, i;
    do { i = k - n + 1;
      tr += this.elements[i][i];
    } while (--n);
    return tr;
  }
function() {
    if (!this.isSquare()) { return null; }
    var tr = this.elements[0][0], n = this.elements.length - 1, k = n, i;
    do { i = k - n + 1;
      tr += this.elements[i][i];
    } while (--n);
    return tr;
  }
function ( ) { if ( ! this . isSquare ( ) ) { return null ; } var tr = this . elements [ 0 ] [ 0 ] , n = this . elements . length - 1 , k = n , i ; do { i = k - n + 1 ; tr += this . elements [ i ] [ i ] ; } while ( -- n ) ; return tr ; }
Returns the trace for square matrices
Returns the trace for square matrices