private bool Approximate(Quaternion v, Quaterniond vd) { if (Math.Abs(v.x - vd.x) < deviation && Math.Abs(v.y - vd.y) < deviation && Math.Abs(v.z - vd.z) < deviation && Math.Abs(v.w - vd.w) < deviation) { return(true); } else { Assert.Fail(string.Format("{0}\n{1}", v.ToString("0.00000"), vd.ToString("0.00000"))); return(false); } }