public void QuaternionMultiplyTest3() { Quaternion a = new Quaternion(1.0f, 2.0f, 3.0f, 4.0f); Quaternion b = new Quaternion(5.0f, 6.0f, 7.0f, 8.0f); Quaternion expected = new Quaternion(24.0f, 48.0f, 48.0f, -6.0f); Quaternion actual; actual = Quaternion.Multiply(a, b); Assert.True(MathHelper.Equal(expected, actual), $"Quaternion.Multiply did not return the expected value: expected {expected} actual {actual}"); }
public void QuaternionMultiplyTest2() { Quaternion a = new Quaternion(1.0f, 2.0f, 3.0f, 4.0f); Single factor = 0.5f; Quaternion expected = new Quaternion(0.5f, 1.0f, 1.5f, 2.0f); Quaternion actual; actual = Quaternion.Multiply(a, factor); Assert.True(MathHelper.Equal(expected, actual), $"Quaternion.Multiply did not return the expected value: expected {expected} actual {actual}"); }