relativeError method

double relativeError (Vector2 correct)

Relative error between this and correct

Implementation

double relativeError(Vector2 correct) {
  final double correct_norm = correct.length;
  final double diff_norm = (this - correct).length;
  return diff_norm / correct_norm;
}