public void QuaternionInverseTest1() { Quaternion a = new Quaternion(); Quaternion actual = Quaternion.Inverse(a); Assert.True(Single.IsNaN(actual.X) && Single.IsNaN(actual.Y) && Single.IsNaN(actual.Z) && Single.IsNaN(actual.W) , $"Quaternion.Inverse - did not return the expected value: expected {new Quaternion(Single.NaN, Single.NaN, Single.NaN, Single.NaN)} actual {actual}"); }
public void QuaternionInverseTest() { Quaternion a = new Quaternion(5.0f, 6.0f, 7.0f, 8.0f); Quaternion expected = new Quaternion(-0.0287356321f, -0.03448276f, -0.0402298868f, 0.04597701f); Quaternion actual; actual = Quaternion.Inverse(a); Assert.Equal(expected, actual); }