BEPUutilities.Quaternion.Multiply C# (CSharp) Méthode

Multiply() public static méthode

Multiplies two quaternions.
public static Multiply ( &a, &b, &result ) : void
a First quaternion to multiply.
b Second quaternion to multiply.
result Product of the multiplication.
Résultat void
        public static void Multiply(ref Quaternion a, ref Quaternion b, out Quaternion result)
        {
            float x = a.X;
            float y = a.Y;
            float z = a.Z;
            float w = a.W;
            float bX = b.X;
            float bY = b.Y;
            float bZ = b.Z;
            float bW = b.W;
            result.X = x * bW + bX * w + y * bZ - z * bY;
            result.Y = y * bW + bY * w + z * bX - x * bZ;
            result.Z = z * bW + bZ * w + x * bY - y * bX;
            result.W = w * bW - x * bX - y * bY - z * bZ;
        }

Same methods

Quaternion::Multiply ( &q, float scale, &result ) : void