relativeError method

double relativeError(
  1. Quaternion correct
)

Relative error between this and correct.

Implementation

double relativeError(Quaternion correct) {
  final diff = correct - this;
  final norm_diff = diff.length;
  final correct_norm = correct.length;
  return norm_diff / correct_norm;
}