Box2DX.Common.Vec3.Cross C# (CSharp) Метод

Cross() публичный статический Метод

Perform the cross product on two vectors.
public static Cross ( Vec3 a, Vec3 b ) : Vec3
a Vec3
b Vec3
Результат Vec3
        public static Vec3 Cross(Vec3 a, Vec3 b)
        {
            return new Vec3(a.Y * b.Z - a.Z * b.Y, a.Z * b.X - a.X * b.Z, a.X * b.Y - a.Y * b.X);
        }

Usage Example

Пример #1
0
        public Vec3 Solve33(Vec3 b)
        {
            float num = Vec3.Dot(this.Col1, Vec3.Cross(this.Col2, this.Col3));

            Box2DXDebug.Assert(num != 0f);
            num = 1f / num;
            return(new Vec3
            {
                X = num * Vec3.Dot(b, Vec3.Cross(this.Col2, this.Col3)),
                Y = num * Vec3.Dot(this.Col1, Vec3.Cross(b, this.Col3)),
                Z = num * Vec3.Dot(this.Col1, Vec3.Cross(this.Col2, b))
            });
        }
All Usage Examples Of Box2DX.Common.Vec3::Cross