Exemplo 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 SCNQuaternion left, ref SCNQuaternion right, out SCNQuaternion result)
 {
     result = new SCNQuaternion(
         right.W * left.Xyz + left.W * right.Xyz + SCNVector3.Cross(left.Xyz, right.Xyz),
         left.W * right.W - SCNVector3.Dot(left.Xyz, right.Xyz));
 }
Exemplo n.º 2
0
 public static SCNQuaternion Mult(SCNQuaternion left, SCNQuaternion right)
 {
     return(new SCNQuaternion(
                right.W * left.Xyz + left.W * right.Xyz + SCNVector3.Cross(left.Xyz, right.Xyz),
                left.W * right.W - SCNVector3.Dot(left.Xyz, right.Xyz)));
 }