Ejemplo n.º 1
0
 /// <summary>
 /// Quaternions are added.
 /// </summary>
 /// <param name="quaternion1">The first quaternion.</param>
 /// <param name="quaternion2">The second quaternion.</param>
 /// <param name="result">The sum of both quaternions.</param>
 public static void Add(ref TSQuaternion quaternion1, ref TSQuaternion quaternion2, out TSQuaternion result)
 {
     result.x = quaternion1.x + quaternion2.x;
     result.y = quaternion1.y + quaternion2.y;
     result.z = quaternion1.z + quaternion2.z;
     result.w = quaternion1.w + quaternion2.w;
 }
Ejemplo n.º 2
0
 public static FP Dot(TSQuaternion a, TSQuaternion b)
 {
     return(a.w * b.w + a.x * b.x + a.y * b.y + a.z * b.z);
 }
Ejemplo n.º 3
0
 static TSQuaternion()
 {
     identity = new TSQuaternion(0, 0, 0, 1);
 }