Ejemplo n.º 1
0
 /// <summary>
 /// Multiplies two instances.
 /// </summary>
 /// <param name="left">The first instance.</param>
 /// <param name="right">The second instance.</param>
 /// <param name="result">A new instance containing the result of the calculation.</param>
 public static void Multiply(ref GQuaternion left, ref GQuaternion right, out GQuaternion result)
 {
     result = new GQuaternion(
         right.W * left.Xyz + left.W * right.Xyz + GVector3.Cross(left.Xyz, right.Xyz),
         left.W * right.W - GVector3.Dot(left.Xyz, right.Xyz));
 }
Ejemplo n.º 2
0
 public static GQuaternion Mult(GQuaternion left, GQuaternion right)
 {
     return(new GQuaternion(
                right.W * left.Xyz + left.W * right.Xyz + GVector3.Cross(left.Xyz, right.Xyz),
                left.W * right.W - GVector3.Dot(left.Xyz, right.Xyz)));
 }