isIdentity method

bool isIdentity([
  1. double epsilon = 1e-12
])

Whether this is the identity rotation, within epsilon.

Implementation

bool isIdentity([double epsilon = 1e-12]) =>
    x.abs() <= epsilon &&
    y.abs() <= epsilon &&
    z.abs() <= epsilon &&
    (w.abs() - 1.0).abs() <= epsilon;