trace method

double trace()

Returns the trace of the matrix. The trace of a matrix is the sum of the diagonal entries.

Implementation

double trace() {
  var t = 0.0;
  t += _m3storage[0];
  t += _m3storage[4];
  t += _m3storage[8];
  return t;
}