/// <summary> /// Test if this YawPitchRoll is approximately equal to another. /// </summary> /// <param name="other"></param> /// <returns></returns> public bool IsSimilar(YawPitchRoll other) { return(Math.Abs(this.XAngle - other.XAngle) < EPSILON2 && Math.Abs(this.YAngle - other.YAngle) < EPSILON2 && Math.Abs(this.ZAngle - other.ZAngle) < EPSILON2); }
/// <summary> /// Is this rotation equivalent to another? I.e. is the resulting orientation the same? /// </summary> /// <param name="other"></param> /// <returns></returns> public bool IsEquivalent(YawPitchRoll other) { // Quick and dirty (and expensive?) test, compare underlying Quaternions... return(this.ToQuaternion().IsEquivalent(other.ToQuaternion())); }