relativeError method Null safety

double relativeError(
  1. Matrix2 correct
)

Returns relative error between this and correct

Implementation

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