relativeError method

double relativeError (Matrix2 correct)

Returns relative error between this and correct

Implementation

double relativeError(Matrix2 correct) {
  final Matrix2 diff = correct - this;
  final double correct_norm = correct.infinityNorm();
  final double diff_norm = diff.infinityNorm();
  return diff_norm / correct_norm;
}