Ejemplo n.º 1
0
        public void Conjugate()
        {
            QuaternionF q = new QuaternionF(1, 2, 3, 4);

            q.Conjugate();
            Assert.AreEqual(1.0f, q.W);
            Assert.AreEqual(-2.0f, q.X);
            Assert.AreEqual(-3.0f, q.Y);
            Assert.AreEqual(-4.0f, q.Z);
        }
Ejemplo n.º 2
0
 public void Conjugate()
 {
     QuaternionF q = new QuaternionF(1, 2, 3, 4);
       q.Conjugate();
       Assert.AreEqual(1.0f, q.W);
       Assert.AreEqual(-2.0f, q.X);
       Assert.AreEqual(-3.0f, q.Y);
       Assert.AreEqual(-4.0f, q.Z);
 }
Ejemplo n.º 3
0
 /// <inheritdoc/>
 public void Invert(ref QuaternionF value, ref QuaternionF inverse)
 {
     // Since it is a unit vector, we can return Conjugated instead of Inverse.
     inverse = value;
     inverse.Conjugate();
 }